aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorNikolay Yakimov <root@livid.pp.ru>2015-03-31 14:32:42 +0300
committerNikolay Yakimov <root@livid.pp.ru>2015-03-31 14:32:42 +0300
commitf1eb1ab9cf6678cabbdb5b312bbd757ed32d8a76 (patch)
treef8b17f358d52c0401a042e0bd2e59a76a04b61a4 /src/Text/Pandoc
parent6a0d500f99aef5792b97d3ecd4f72af7cc473a72 (diff)
downloadpandoc-f1eb1ab9cf6678cabbdb5b312bbd757ed32d8a76.tar.gz
Latex Reader: Block commands code cleanup
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs5
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