From fcbe1e95ebe170aadc6eadd6797ddf7fbb286ef2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 4 Jan 2011 19:12:33 -0800 Subject: Moved 'macro' and 'applyMacros'' from markdown reader to Parsing. --- src/Text/Pandoc/Readers/Markdown.hs | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/Text/Pandoc/Readers/Markdown.hs') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index feeb1a69c..2c8bef063 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -44,7 +44,6 @@ import Text.Pandoc.Readers.HTML ( htmlTag, htmlInBalanced, isInlineTag, isBlockT import Text.Pandoc.CharacterReferences ( decodeCharacterReferences ) import Text.ParserCombinators.Parsec import Control.Monad (when, liftM, guard) -import Text.TeXMath.Macros (applyMacros, Macro, pMacroDefinition) import Text.HTML.TagSoup import Text.HTML.TagSoup.Match (tagOpen) @@ -871,29 +870,6 @@ table = multilineTable False <|> simpleTable True <|> simpleTable False <|> multilineTable True <|> gridTable False <|> gridTable True "table" --- --- Macros --- - --- | Parse a \newcommand or \renewcommand macro definition. -macro :: GenParser Char ParserState Block -macro = getState >>= guard . stateApplyMacros >> - pMacroDefinition >>= addMacro >> blanklines >> return Null - --- | Add a macro to the list of macros in state. -addMacro :: Macro -> GenParser Char ParserState () -addMacro m = do - updateState $ \st -> st{ stateMacros = m : stateMacros st } - --- | Apply current macros to string. -applyMacros' :: String -> GenParser Char ParserState String -applyMacros' target = do - apply <- liftM stateApplyMacros getState - if apply - then do macros <- liftM stateMacros getState - return $ applyMacros macros target - else return target - -- -- inline -- -- cgit v1.2.3