aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-07-19 13:58:02 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-07-19 17:44:16 -0700
commit34b229dd5a8493bad62498e5485f2775e2289ce8 (patch)
treef67e970484dd47785cbf2ea1ca2209e065dbf0fd /test/command
parentac1a46b0cb4206eb3d46e2f29f29d53b0489c184 (diff)
downloadpandoc-34b229dd5a8493bad62498e5485f2775e2289ce8.tar.gz
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.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/4781.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/command/4781.md b/test/command/4781.md
new file mode 100644
index 000000000..7dc973c7c
--- /dev/null
+++ b/test/command/4781.md
@@ -0,0 +1,22 @@
+```
+% 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"]]]
+```