aboutsummaryrefslogtreecommitdiffstats
path: root/parser/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'parser/src/tests.rs')
-rw-r--r--parser/src/tests.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/parser/src/tests.rs b/parser/src/tests.rs
index 79438e0..504d13b 100644
--- a/parser/src/tests.rs
+++ b/parser/src/tests.rs
@@ -111,7 +111,7 @@ fn inline_code_literal_with_underscore() {
input: "``NAME_WITH_UNDERSCORE``",
rule: Rule::inline,
tokens: [
- literal(2, 22, [str_nested(2, 22)]),
+ literal(2, 22),
]
};
}
@@ -218,6 +218,23 @@ A |subst| in-line
};
}
+#[test]
+fn substitution_in_literal() {
+ parses_to! {
+ parser: RstParser,
+ input: "Just ``|code|``, really ``*code* |only|``",
+ rule: Rule::document,
+ tokens: [
+ paragraph(0, 41, [
+ str(0, 5),
+ literal(7, 13),
+ str(15, 24),
+ literal(26, 39),
+ ]),
+ ]
+ };
+}
+
#[allow(clippy::cognitive_complexity)]
#[test]