git.iko.soy/typeable/pandoc
on master help sign in
RST reader: fix parsing of headers with trailing space.

This was a regression in pandoc 2.0. Closes #4280.

commit957c0e110dd54cf7adaca6c9d7eb0b01c8b0210c authorJohn MacFarlane <jgm@berkeley.edu> dateSat 20 Jan 2018, 11:08 (9 years ago) parentd9dd9be
2 files changed+8−1
src/Text/Pandoc/Readers/RST.hs+1−1 test/command/4280.md+7
src/Text/Pandoc/Readers/RST.hs+1−1
@@ -352,7 +352,7 @@ singleHeader' :: PandocMonad m => RSTParser m (Inlines, Char)
352352singleHeader' = try $ do
353353 notFollowedBy' whitespace
354354 lookAhead $ anyLine >> oneOf underlineChars
355− txt <- trimInlines . mconcat <$> many1 (do {notFollowedBy newline; inline})
355+ txt <- trimInlines . mconcat <$> many1 (notFollowedBy blankline >> inline)
356356 pos <- getPosition
357357 let len = sourceColumn pos - 1
358358 blankline
test/command/4280.mdnew file+7
@@ -0,0 +1,7 @@
1+```
2+% pandoc -f rst -t native
3+Driver
4+------
5+^D
6+[Header 1 ("driver",[],[]) [Str "Driver"]]
7+```