aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser/tests.rs
diff options
context:
space:
mode:
authorPhilipp A2019-11-09 20:15:18 +0100
committerPhilipp A2019-11-09 20:15:18 +0100
commitc41f32f76304435e34f9d334b14a6cdda7b8961f (patch)
treebdd90f98641702c5efc339e02515e8486d46d52a /src/parser/tests.rs
parent2ddff4fbbfbf4593260b96e57e7f975d2d003714 (diff)
downloadrust-rst-c41f32f76304435e34f9d334b14a6cdda7b8961f.tar.bz2
Support multiline replace
Diffstat (limited to 'src/parser/tests.rs')
-rw-r--r--src/parser/tests.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parser/tests.rs b/src/parser/tests.rs
index 075b750..a3df64c 100644
--- a/src/parser/tests.rs
+++ b/src/parser/tests.rs
@@ -118,6 +118,8 @@ fn substitutions() {
A |subst| in-line
.. |subst| replace:: substitution
+.. |subst2| replace:: it can also
+ be hanging
",
rule: Rule::document,
tokens: [
@@ -126,9 +128,13 @@ A |subst| in-line
substitution_ref(2, 9, [ substitution_name(3, 8) ]),
str(9, 17),
]),
- substitution_def(19, 53, [
+ substitution_def(19, 52, [
substitution_name(23, 28),
- replace(30, 53, [ line(39, 53, [str(39, 52)]) ])
+ replace(30, 52, [ paragraph(39, 52, [str(39, 52)]) ]),
+ ]),
+ substitution_def(53, 101, [
+ substitution_name(57, 63),
+ replace(65, 101, [ paragraph(74, 101, [str(74, 86), str(88, 100)]) ]),
]),
]
};