aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-05-13 09:50:16 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-05-13 10:16:06 -0700
commitc9cb313a479f3d134d5df1cffe5e340034fb44b4 (patch)
tree3c8aeb05ec1eb6703acd37d120e6e8f9aa97083d /src/Text/Pandoc/Readers
parent70df1b572bc6859a50f43f00850bec16bff354c7 (diff)
downloadpandoc-c9cb313a479f3d134d5df1cffe5e340034fb44b4.tar.gz
Fixed regression in charsInBalancedBrackets.
Introduced by e9d7504. This regression caused link and image references containing raw tex not to parse correctly. Added test. Closes #2150.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index cc5521a62..e697febf6 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -177,9 +177,10 @@ charsInBalancedBrackets openBrackets =
(char '[' >> charsInBalancedBrackets (openBrackets + 1))
<|> (char ']' >> charsInBalancedBrackets (openBrackets - 1))
<|> (( (() <$ code)
- <|> (() <$ escapedChar')
+ <|> (() <$ (escapedChar'))
<|> (newline >> notFollowedBy blankline)
<|> skipMany1 (noneOf "[]`\n\\")
+ <|> (() <$ count 1 (oneOf "`\\"))
) >> charsInBalancedBrackets openBrackets)
--