diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 63a69774b..227d6e791 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -209,6 +209,7 @@ inlinesInBalancedBrackets = (() <$ (escapedChar <|> code <|> math <|> + endline <|> rawHtmlInline <|> rawLaTeXInline') >> go openBrackets) <|> @@ -217,7 +218,7 @@ inlinesInBalancedBrackets = <|> (char '[' >> go (openBrackets + 1)) <|> - (anyChar >> go openBrackets) + (satisfy (/= '\n') >> go openBrackets) -- -- document structure diff --git a/test/command/8028.md b/test/command/8028.md new file mode 100644 index 000000000..325e93b64 --- /dev/null +++ b/test/command/8028.md @@ -0,0 +1,10 @@ +``` +% pandoc +foo^[a note + +with multiple paragraphs] +^D +

foo^[a note

+

with multiple paragraphs]

+ +```