From 6316d8374655ff3debe33defc7697844fc8a7cb6 Mon Sep 17 00:00:00 2001 From: Philipp A Date: Thu, 15 Nov 2018 22:31:53 +0100 Subject: fixed blank line handling --- src/parser/tests.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/parser') diff --git a/src/parser/tests.rs b/src/parser/tests.rs index 6b37b07..243cb26 100644 --- a/src/parser/tests.rs +++ b/src/parser/tests.rs @@ -73,7 +73,38 @@ fn two_targets() { ]), ] }; +} + +#[test] +fn admonitions() { + parses_to! { + parser: RstParser, + input: "\ +.. note:: In line + Next line +.. admonition:: + Just next line + +.. danger:: Just this line +", + rule: Rule::document, + tokens: [ + admonition(0, 31, [ + admonition_type(3, 7), + line(9, 18), + paragraph(21, 31, [ line(21, 31) ]), + ]), + admonition(31, 66, [ + admonition_type(34, 44), + paragraph(51, 66, [ line(51, 66) ]), + ]), + admonition(67, 94, [ + admonition_type(70, 76), + line(78, 94), + ]), + ] + }; } #[test] -- cgit v1.2.3