aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Parsing/Math.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing/Math.hs b/src/Text/Pandoc/Parsing/Math.hs
index fc8da73bd..a958d5b86 100644
--- a/src/Text/Pandoc/Parsing/Math.hs
+++ b/src/Text/Pandoc/Parsing/Math.hs
@@ -42,7 +42,7 @@ mathInlineWith op cl = try $ do
(try (string "text" >>
(("\\text" <>) <$> inBalancedBraces 0 ""))
<|> (\c -> T.pack ['\\',c]) <$> anyChar))
- <|> ("\n" <$ blankline <* notFollowedBy' blankline)
+ <|> ("\n" <$ blankline <* notFollowedBy' blankline <* notFollowedBy (char '$'))
<|> (T.pack <$> many1 spaceChar <* notFollowedBy (char '$'))
) (try $ textStr cl)
notFollowedBy digit -- to prevent capture of $5