git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #4914 from danse/4912-2

parse rST inlines containing newlines closing #4912

commit9161dc4a6d12d937a70bd806cc3af3e7dac5c9c7 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 18 Sep 2018, 09:39 (8 years ago) parente09dc44db2a68d
2 files changed+4−1
src/Text/Pandoc/Readers/RST.hs+1−1 test/Tests/Readers/RST.hs+3
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 ]