diff options
| author | Philipp A | 2018-11-15 22:31:53 +0100 | 
|---|---|---|
| committer | Philipp A | 2018-11-15 22:31:53 +0100 | 
| commit | 6316d8374655ff3debe33defc7697844fc8a7cb6 (patch) | |
| tree | daa578a226ba2b24c6f8ef51cb7909e0e9eb2728 /src/parser/tests.rs | |
| parent | 2c04f8adcbe467e06fb5559dbcd125246f8ab49e (diff) | |
| download | rust-rst-6316d8374655ff3debe33defc7697844fc8a7cb6.tar.bz2 | |
fixed blank line handling
Diffstat (limited to 'src/parser/tests.rs')
| -rw-r--r-- | src/parser/tests.rs | 31 | 
1 files changed, 31 insertions, 0 deletions
| 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] | 
