summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
-rw-r--r--test/command/3558.md8
2 files changed, 10 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
diff --git a/test/command/3558.md b/test/command/3558.md
new file mode 100644
index 000000000..3f4079064
--- /dev/null
+++ b/test/command/3558.md
@@ -0,0 +1,8 @@
+```
+% pandoc -t native
+\startmulti
+hello
+\endmulti
+^D
+[Para [RawInline (Format "tex") "\\startmulti\n",Str "hello",SoftBreak,RawInline (Format "tex") "\\endmulti"]]
+```