aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index c31266ea3..bdbf8f100 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -717,10 +717,8 @@ rawLaTeXBlock = snd <$> try (withRaw (environment <|> blockCommand))
rawLaTeXInline :: Parser [Char] ParserState Inline
rawLaTeXInline = do
- (res, raw) <- withRaw inlineCommand
- if res == mempty
- then return (Str "")
- else RawInline "latex" <$> (applyMacros' raw)
+ raw <- (snd <$> withRaw inlineCommand) <|> (snd <$> withRaw blockCommand)
+ RawInline "latex" <$> applyMacros' raw
environments :: M.Map String (LP Blocks)
environments = M.fromList