parse rST inlines containing newlines closing #4912
this eliminates a regression error introduced after pandoc 2.1.1,
affecting rST inline parsing. see the issue for details
commitdb2a68d089e06bbf298b939252f826c84b6b6702
authordanse <f.occhipinti@gmail.com>
dateTue 18 Sep 2018, 13:24 (8 years ago)
parente09dc44
src/Text/Pandoc/Readers/RST.hs+1−1
@@ -1315,7 +1315,6 @@ table = gridTable False <|> simpleTable False <|>
13151315inline :: PandocMonad m => RSTParser m Inlines
13161316inline = choice [ note -- can start with whitespace, so try before ws
13171317 , link
1318− , endline
13191318 , strong
13201319 , emph
13211320 , code
@@ -1328,6 +1327,7 @@ inline = choice [ note -- can start with whitespace, so try before ws
13281327inlineContent :: PandocMonad m => RSTParser m Inlines
13291328inlineContent = choice [ whitespace
13301329 , str
1330+ , endline
13311331 , smart
13321332 , hyphens
13331333 , escapedChar
test/Tests/Readers/RST.hs+3
@@ -198,5 +198,8 @@ tests = [ "line block with blank line" =:
198198 , "bare URI parsing disabled inside emphasis (#4561)" =:
199199 "*http://location*" =?>
200200 para (emph (text "http://location"))
201+ , "include newlines" =:
202+ "**before\nafter**" =?>
203+ para (strong (text "before\nafter"))
201204 ]
202205 ]