@@ -1644,7 +1644,9 @@ blockCommand = try $ do
1644 let names = ordNub [name', name]
1644 let names = ordNub [name', name]
1645 let rawDefiniteBlock = do
1645 let rawDefiniteBlock = do
1646 guard $ isBlockCommand name
1646 guard $ isBlockCommand name
1647− rawBlock "latex" <$> getRawCommand name (txt <> star)
1647+ rawcontents <- getRawCommand name (txt <> star)
1648+ (guardEnabled Ext_raw_tex >> return (rawBlock "latex" rawcontents))
1649+ <|> ignore rawcontents
1648 -- heuristic: if it could be either block or inline, we
1650 -- heuristic: if it could be either block or inline, we
1649 -- treat it if block if we have a sequence of block
1651 -- treat it if block if we have a sequence of block
1650 -- commands followed by a newline. But we stop if we
1652 -- commands followed by a newline. But we stop if we
@@ -1656,7 +1658,10 @@ blockCommand = try $ do
1656 guard $ "start" `T.isPrefixOf` n
1658 guard $ "start" `T.isPrefixOf` n
1657 let rawMaybeBlock = try $ do
1659 let rawMaybeBlock = try $ do
1658 guard $ not $ isInlineCommand name
1660 guard $ not $ isInlineCommand name
1659− curr <- rawBlock "latex" <$> getRawCommand name (txt <> star)
1661+ rawcontents <- getRawCommand name (txt <> star)
1662+ curr <- (guardEnabled Ext_raw_tex >>
1663+ return (rawBlock "latex" rawcontents))
1664+ <|> ignore rawcontents
1660 rest <- many $ notFollowedBy startCommand *> blockCommand
1665 rest <- many $ notFollowedBy startCommand *> blockCommand
1661 lookAhead $ blankline <|> startCommand
1666 lookAhead $ blankline <|> startCommand
1662 return $ curr <> mconcat rest
1667 return $ curr <> mconcat rest