RST reader: fix logic for ending comments.
Previously comments sometimes got extended too far. Closes #7134.
This commit is contained in:
parent
a8b2031bb4
commit
1c23e3a824
2 changed files with 18 additions and 1 deletions
|
@ -613,8 +613,9 @@ comment = try $ do
|
|||
string ".."
|
||||
skipMany1 spaceChar <|> (() <$ lookAhead newline)
|
||||
-- notFollowedBy' directiveLabel -- comment comes after directive so unnec.
|
||||
manyTill anyChar blanklines
|
||||
_ <- anyLine
|
||||
optional indentedBlock
|
||||
optional blanklines
|
||||
return mempty
|
||||
|
||||
directiveLabel :: Monad m => RSTParser m Text
|
||||
|
|
16
test/command/7134.md
Normal file
16
test/command/7134.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
```
|
||||
% pandoc -f rst -t native
|
||||
This is a paragraph.
|
||||
|
||||
This is a block quote.
|
||||
|
||||
..
|
||||
|
||||
This should be a second block quote.
|
||||
^D
|
||||
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "paragraph."]
|
||||
,BlockQuote
|
||||
[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."]]
|
||||
,BlockQuote
|
||||
[Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "second",Space,Str "block",Space,Str "quote."]]]
|
||||
```
|
Loading…
Add table
Reference in a new issue