summaryrefslogtreecommitdiff
path: root/macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test
diff options
context:
space:
mode:
Diffstat (limited to 'macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test')
-rw-r--r--macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test57
1 files changed, 57 insertions, 0 deletions
diff --git a/macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test b/macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test
new file mode 100644
index 0000000000..8d42218e09
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/lunamark-markdown/blank-before-code-fence.test
@@ -0,0 +1,57 @@
+\def\markdownOptionFencedCode{true}
+\def\markdownOptionBlankBeforeCodeFence{true}
+<<<
+This test ensures that the Lua `fencedCode` and `blankBeforeCodeFence` options
+correctly propagate through the plain TeX interface.
+
+The following fenced code block should resolve to a code span.
+
+foo
+``` foo
+bar
+```
+
+foo
+~~~ foo
+bar
+~~~
+
+The following fenced code blocks should be recognized as such.
+
+foo
+
+``` foo
+bar
+```
+
+foo
+
+~~~ foo
+bar
+~~~
+>>>
+codeSpan: fencedCode
+codeSpan: blankBeforeCodeFence
+interblockSeparator
+interblockSeparator
+codeSpan: foo bar
+interblockSeparator
+tilde
+tilde
+tilde
+tilde
+tilde
+tilde
+interblockSeparator
+interblockSeparator
+interblockSeparator
+BEGIN fencedCode
+- src: ./_markdown_test/c157a79031e1c40f85931829bc5fc552.verbatim
+- infostring: foo
+END fencedCode
+interblockSeparator
+interblockSeparator
+BEGIN fencedCode
+- src: ./_markdown_test/c157a79031e1c40f85931829bc5fc552.verbatim
+- infostring: foo
+END fencedCode