diff options
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 2 | ||||
-rw-r--r-- | test/command/4280.md | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 0e90fe945..e88d997f0 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -352,7 +352,7 @@ singleHeader' :: PandocMonad m => RSTParser m (Inlines, Char) singleHeader' = try $ do notFollowedBy' whitespace lookAhead $ anyLine >> oneOf underlineChars - txt <- trimInlines . mconcat <$> many1 (do {notFollowedBy newline; inline}) + txt <- trimInlines . mconcat <$> many1 (notFollowedBy blankline >> inline) pos <- getPosition let len = sourceColumn pos - 1 blankline diff --git a/test/command/4280.md b/test/command/4280.md new file mode 100644 index 000000000..6a89b5e63 --- /dev/null +++ b/test/command/4280.md @@ -0,0 +1,7 @@ +``` +% pandoc -f rst -t native +Driver +------ +^D +[Header 1 ("driver",[],[]) [Str "Driver"]] +``` |