aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-04-06 11:30:03 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-04-06 11:30:03 +0200
commit12ae1df5bfa447f94d8a3db24dd890e54bcbcf55 (patch)
tree47753976a96bf6e10aa57b7c31658b661ab5708d /src
parent12a3481632bfc3d477759095fa01fa92e169b292 (diff)
downloadpandoc-12ae1df5bfa447f94d8a3db24dd890e54bcbcf55.tar.gz
Allow raw latex commands starting with `\start` in Markdown.
Previously these weren't allowed because they were interpreted as starting ConTeXt environments, even without a corresponding \stop... Closes #3558.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 5f08afe08..9eb242d74 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1912,7 +1912,8 @@ inlineNote = try $ do
rawLaTeXInline' :: PandocMonad m => MarkdownParser m (F Inlines)
rawLaTeXInline' = try $ do
guardEnabled Ext_raw_tex
- lookAhead $ char '\\' >> notFollowedBy' (string "start") -- context env
+ lookAhead (char '\\')
+ notFollowedBy' rawConTeXtEnvironment
RawInline _ s <- rawLaTeXInline
return $ return $ B.rawInline "tex" s
-- "tex" because it might be context or latex