pandoc/test/command/4781.md
John MacFarlane 34b229dd5a Fix for bug in parsing \include in markdown.
Starting in 2.2.2, everything after an `\input` (or `\include`)
in a markdown file would be parsed as raw LaTeX.
This commit fixes the issue and adds a regression test.

Closes #4781.
2018-07-19 17:44:16 -07:00

482 B

% pandoc -t native
Markdown parsed *here*

\include{command/bar}

*But not here*
^D
[Para [Str "Markdown",Space,Str "parsed",Space,Emph [Str "here"]]
,RawBlock (Format "latex") "\\include{command/bar}"
,Para [Emph [Str "But",Space,Str "not",Space,Str "here"]]]
% pandoc -t native
*here* \input{command/bar}

*But not here*
^D
[Para [Emph [Str "here"],Space,RawInline (Format "tex") "\\input{command/bar}"]
,Para [Emph [Str "But",Space,Str "not",Space,Str "here"]]]