aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-01-20 11:08:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-01-20 11:10:09 -0800
commit957c0e110dd54cf7adaca6c9d7eb0b01c8b0210c (patch)
tree077f403976259f196dc68b2b56917fa584c2d319 /src
parentd9dd9beda1d88de68a7896b46044b43f87a6e447 (diff)
downloadpandoc-957c0e110dd54cf7adaca6c9d7eb0b01c8b0210c.tar.gz
RST reader: fix parsing of headers with trailing space.
This was a regression in pandoc 2.0. Closes #4280.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/RST.hs2
1 files changed, 1 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