diff options
| author | Philipp A | 2020-09-06 22:30:19 +0200 |
|---|---|---|
| committer | Philipp A | 2020-09-07 00:28:39 +0200 |
| commit | c80468a8f917079189c8cd111556f9752085e3e4 (patch) | |
| tree | 62408e2ea52c38fbdf6f6d213cfa8ddb4a0e8131 /parser/src/tests.rs | |
| parent | 4de128cf7924ad3c0c81dfc52701ace16b010749 (diff) | |
| download | rust-rst-c80468a8f917079189c8cd111556f9752085e3e4.tar.bz2 | |
Don’t parse literal content
Diffstat (limited to 'parser/src/tests.rs')
| -rw-r--r-- | parser/src/tests.rs | 19 |
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] |
