From 12ae1df5bfa447f94d8a3db24dd890e54bcbcf55 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 6 Apr 2017 11:30:03 +0200 Subject: 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. --- src/Text/Pandoc/Readers/Markdown.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3