diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-31 14:32:42 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-31 14:32:42 +0300 |
commit | f1eb1ab9cf6678cabbdb5b312bbd757ed32d8a76 (patch) | |
tree | f8b17f358d52c0401a042e0bd2e59a76a04b61a4 /src/Text/Pandoc/Readers | |
parent | 6a0d500f99aef5792b97d3ecd4f72af7cc473a72 (diff) | |
download | pandoc-f1eb1ab9cf6678cabbdb5b312bbd757ed32d8a76.tar.gz |
Latex Reader: Block commands code cleanup
Diffstat (limited to 'src/Text/Pandoc/Readers')
-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 |