diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 31a4c7c5c..2886e2f29 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -253,10 +253,9 @@ blockCommand = try $ do let raw = do rawcommand <- getRawCommand name' transformed <- applyMacros' rawcommand + guard $ transformed /= rawcommand notFollowedBy $ parseFromString inlines transformed - if transformed /= rawcommand - then parseFromString blocks transformed - else mzero + parseFromString blocks transformed case M.lookup name' blockCommands of Just p -> p Nothing -> case M.lookup name blockCommands of |