@@ -445,7 +445,6 @@ inlineCommand :: PandocMonad m => LP m Inlines
445inlineCommand = try $ do
445inlineCommand = try $ do
446 (name, raw') <- withRaw anyControlSeq
446 (name, raw') <- withRaw anyControlSeq
447 guard $ name /= "begin" && name /= "end"
447 guard $ name /= "begin" && name /= "end"
448− guard $ not $ isBlockCommand name
449 exts <- getOption readerExtensions
448 exts <- getOption readerExtensions
450 star <- option "" (string "*")
449 star <- option "" (string "*")
451 let name' = name ++ star
450 let name' = name ++ star
@@ -461,7 +460,7 @@ inlineCommand = try $ do
461 else ignore rawcommand
460 else ignore rawcommand
462 (lookupListDefault mzero [name',name] inlineCommands <*
461 (lookupListDefault mzero [name',name] inlineCommands <*
463 optional (try (string "{}")))
462 optional (try (string "{}")))
464− <|> raw
463+ <|> (guard (not (isBlockCommand name)) >> raw)
466unlessParseRaw :: PandocMonad m => LP m ()
465unlessParseRaw :: PandocMonad m => LP m ()
467unlessParseRaw = getOption readerExtensions >>=
466unlessParseRaw = getOption readerExtensions >>=
@@ -648,7 +647,10 @@ inlineCommands = M.fromList $
648 ] ++ map ignoreInlines
647 ] ++ map ignoreInlines
649 -- these commands will be ignored unless --parse-raw is specified,
648 -- these commands will be ignored unless --parse-raw is specified,
650 -- in which case they will appear as raw latex blocks:
649 -- in which case they will appear as raw latex blocks:
651− [ "index" ]
650+ [ "index"
653mkImage :: PandocMonad m => [(String, String)] -> String -> LP m Inlines
655mkImage :: PandocMonad m => [(String, String)] -> String -> LP m Inlines
654mkImage options src = do
656mkImage options src = do