diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-07-23 21:02:58 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-07-24 00:02:55 +0200 |
commit | 159d31e80ff2430e09b3084c5cea85fae46652a9 (patch) | |
tree | a13f64534e1ba3c49ee4c6bb1994cf3544222e7a | |
parent | be14e2b5013a442989a338c13baa4d16881f849e (diff) | |
download | pandoc-159d31e80ff2430e09b3084c5cea85fae46652a9.tar.gz |
LaTeX reader: Removed 'macro'.
It is no longer necessary, since the rawLaTeXBlock parser
will parse macro definitions.
This also avoids the need for a separate latexMacro parser
in the Markdown reader.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 12 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index cc567d5bd..b0f8d536e 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -37,7 +37,6 @@ module Text.Pandoc.Readers.LaTeX ( readLaTeX, applyMacros, rawLaTeXInline, rawLaTeXBlock, - macro, inlineCommand ) where diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ab6a32b78..d7e59c7fd 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -61,8 +61,8 @@ import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (tableWith) import Text.Pandoc.Readers.HTML (htmlInBalanced, htmlTag, isBlockTag, isCommentTag, isInlineTag, isTextTag) -import Text.Pandoc.Readers.LaTeX (rawLaTeXBlock, rawLaTeXInline, applyMacros, - macro) +import Text.Pandoc.Readers.LaTeX (rawLaTeXBlock, + rawLaTeXInline, applyMacros) import Text.Pandoc.Shared import qualified Text.Pandoc.UTF8 as UTF8 import Text.Pandoc.XML (fromEntities) @@ -507,7 +507,6 @@ block = do , htmlBlock , table , codeBlockIndented - , latexMacro , rawTeXBlock , lineBlock , blockQuote @@ -1096,13 +1095,6 @@ rawVerbatimBlock = htmlInBalanced isVerbTag isVerbTag (TagOpen "script" _) = True isVerbTag _ = False -latexMacro :: PandocMonad m => MarkdownParser m (F Blocks) -latexMacro = try $ do - guardEnabled Ext_latex_macros - skipNonindentSpaces - res <- macro - return $ return res - rawTeXBlock :: PandocMonad m => MarkdownParser m (F Blocks) rawTeXBlock = do guardEnabled Ext_raw_tex |