summaryrefslogtreecommitdiff
path: root/macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test
diff options
context:
space:
mode:
Diffstat (limited to 'macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test')
-rw-r--r--macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test115
1 files changed, 115 insertions, 0 deletions
diff --git a/macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test b/macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test
new file mode 100644
index 0000000000..3063b324e9
--- /dev/null
+++ b/macros/generic/markdown/tests/testfiles/lunamark-markdown/citations-trailing-punctuation.test
@@ -0,0 +1,115 @@
+\def\markdownOptionCitations{true}
+<<<
+This test ensures that the Lua `citations` option correctly propagates through
+the plain TeX interface and that the trailing punctuation does not get included
+in the citation name.
+
+[@f] [@f:] [@foo:bar] [@foo:bar:]
+
+[@_] [@f_] [@foo_bar] [@foo_bar_]
+
+ @f @f: @foo:bar @foo:bar:
+
+ @_ @f_ @foo_bar @foo_bar_
+>>>
+codeSpan: citations
+interblockSeparator
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo:bar
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo:bar
+END cite
+interblockSeparator
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: _
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f_
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo_bar
+END cite
+BEGIN cite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo_bar_
+END cite
+interblockSeparator
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo:bar
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo:bar
+END textCite
+interblockSeparator
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: _
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: f_
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo_bar
+END textCite
+BEGIN textCite
+- suppressAuthor: false
+- prenote:
+- postnote:
+- name: foo_bar_
+END textCite