From db2a68d089e06bbf298b939252f826c84b6b6702 Mon Sep 17 00:00:00 2001 From: danse Date: Tue, 18 Sep 2018 13:24:24 +0200 Subject: 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 --- src/Text/Pandoc/Readers/RST.hs | 2 +- test/Tests/Readers/RST.hs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 6a9e7cb95..274c9da7a 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -1315,7 +1315,6 @@ table = gridTable False <|> simpleTable False <|> inline :: PandocMonad m => RSTParser m Inlines inline = choice [ note -- can start with whitespace, so try before ws , link - , endline , strong , emph , code @@ -1328,6 +1327,7 @@ inline = choice [ note -- can start with whitespace, so try before ws inlineContent :: PandocMonad m => RSTParser m Inlines inlineContent = choice [ whitespace , str + , endline , smart , hyphens , escapedChar diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs index 8916eed6f..963e7530d 100644 --- a/test/Tests/Readers/RST.hs +++ b/test/Tests/Readers/RST.hs @@ -198,5 +198,8 @@ tests = [ "line block with blank line" =: , "bare URI parsing disabled inside emphasis (#4561)" =: "*http://location*" =?> para (emph (text "http://location")) + , "include newlines" =: + "**before\nafter**" =?> + para (strong (text "before\nafter")) ] ] -- cgit v1.2.3