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:
parent
12a3481632
commit
12ae1df5bf
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
8
test/command/3558.md
Normal file
8
test/command/3558.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
```
|
||||
% pandoc -t native
|
||||
\startmulti
|
||||
hello
|
||||
\endmulti
|
||||
^D
|
||||
[Para [RawInline (Format "tex") "\\startmulti\n",Str "hello",SoftBreak,RawInline (Format "tex") "\\endmulti"]]
|
||||
```
|
Loading…
Add table
Reference in a new issue