mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-23 16:56:43 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
```
|
||||
% pandoc -t native
|
||||
\startmulti
|
||||
hello
|
||||
\endmulti
|
||||
^D
|
||||
[Para [RawInline (Format "tex") "\\startmulti\n",Str "hello",SoftBreak,RawInline (Format "tex") "\\endmulti"]]
|
||||
```
|
||||
Reference in New Issue
Block a user