diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-04 22:20:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-04 22:20:35 -0800 |
commit | 85bfd26b78a3d2d3087724316aced06cb56f4173 (patch) | |
tree | 9f95baa8f6fb41f533b1d0387de0d5ee95df6ac8 /src/Text/Pandoc/Readers | |
parent | 22b2c02aeb5260aa9f904601d051c47a1dfb68d6 (diff) | |
download | pandoc-85bfd26b78a3d2d3087724316aced06cb56f4173.tar.gz |
LaTeX reader: Parse bracketed {parts} as raw TeX.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index abec41349..9006d5a39 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -40,7 +40,7 @@ import Text.Pandoc.Parsing import Data.Maybe ( fromMaybe ) import Data.Char ( chr, toUpper ) import Data.List ( isPrefixOf, isSuffixOf ) -import Control.Monad ( when ) +import Control.Monad ( when, liftM ) -- | Parse LaTeX from string and return 'Pandoc' document. readLaTeX :: ParserState -- ^ Parser state, including options for parser @@ -906,7 +906,7 @@ rawLaTeXInline' :: GenParser Char ParserState Inline rawLaTeXInline' = do notFollowedBy' $ oneOfStrings ["\\begin", "\\end", "\\item", "\\ignore", "\\section"] - rawLaTeXInline + rawLaTeXInline <|> liftM TeX (bracketedText '{' '}') -- | Parse any LaTeX command and return it in a raw TeX inline element. rawLaTeXInline :: GenParser Char ParserState Inline |