git.iko.soy/typeable/pandoc
on master help sign in
RST reader: fix parsing of headers with trailing space.
957c0e1John MacFarlane
src/Text/Pandoc/Readers/RST.hs+1−1
@@ -352,7 +352,7 @@ singleHeader' :: PandocMonad m => RSTParser m (Inlines, Char)
352singleHeader' = try $ do
352singleHeader' = try $ do
353 notFollowedBy' whitespace
353 notFollowedBy' whitespace
354 lookAhead $ anyLine >> oneOf underlineChars
354 lookAhead $ anyLine >> oneOf underlineChars
355− txt <- trimInlines . mconcat <$> many1 (do {notFollowedBy newline; inline})
355+ txt <- trimInlines . mconcat <$> many1 (notFollowedBy blankline >> inline)
356 pos <- getPosition
356 pos <- getPosition
357 let len = sourceColumn pos - 1
357 let len = sourceColumn pos - 1
358 blankline
358 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+```