aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 02c7361d7..c965c65ce 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -574,6 +574,7 @@ inline = choice [ str
, ensureMath
, rawLaTeXInline'
, escapedChar
+ , emptyGroup
, unescapedChar
, comment
] <?> "inline"
@@ -677,6 +678,13 @@ escapedChar = do
result <- escaped (oneOf specialChars)
return $ if result == Str "\n" then Str " " else result
+emptyGroup :: GenParser Char st Inline
+emptyGroup = try $ do
+ char '{'
+ spaces
+ char '}'
+ return $ Str ""
+
-- nonescaped special characters
unescapedChar :: GenParser Char st Inline
unescapedChar = oneOf "`$^&_#{}[]|<>" >>= return . (\c -> Str [c])