From 55bf5fe916239343a10900741a14f83e7a6e9444 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Mon, 13 Feb 2017 00:30:34 -0500 Subject: [PATCH] ADDED: Improved citation support in LaTeX --- src/html.c | 13 +-- src/latex.c | 119 ++++++++++++++++-------- src/latex.h | 2 + src/writer.c | 7 +- src/writer.h | 1 + tests/MMD6Tests/Citations.html | 26 +++++- tests/MMD6Tests/Citations.htmlc | 22 +++++ tests/MMD6Tests/Citations.tex | 41 ++++++++ tests/MMD6Tests/Citations.text | 24 +++++ tests/MMD6Tests/Dutch.html | 2 +- tests/MMD6Tests/Dutch.htmlc | 2 +- tests/MMD6Tests/Dutch.tex | 23 +++++ tests/MMD6Tests/Dutch.text | 2 + tests/MMD6Tests/English.html | 2 +- tests/MMD6Tests/English.htmlc | 2 +- tests/MMD6Tests/English.tex | 23 +++++ tests/MMD6Tests/English.text | 2 + tests/MMD6Tests/French.html | 2 +- tests/MMD6Tests/French.htmlc | 2 +- tests/MMD6Tests/French.tex | 23 +++++ tests/MMD6Tests/French.text | 2 + tests/MMD6Tests/German Guillemets.html | 8 +- tests/MMD6Tests/German Guillemets.htmlc | 2 +- tests/MMD6Tests/German Guillemets.tex | 23 +++++ tests/MMD6Tests/German Guillemets.text | 2 + tests/MMD6Tests/German.html | 8 +- tests/MMD6Tests/German.htmlc | 2 +- tests/MMD6Tests/German.tex | 23 +++++ tests/MMD6Tests/German.text | 2 + tests/MMD6Tests/Integrated.html | 7 ++ tests/MMD6Tests/Integrated.htmlc | 2 + tests/MMD6Tests/Integrated.tex | 16 +++- tests/MMD6Tests/Integrated.text | 4 + tests/MMD6Tests/Swedish.html | 2 +- tests/MMD6Tests/Swedish.htmlc | 2 +- tests/MMD6Tests/Swedish.tex | 23 +++++ tests/MMD6Tests/Swedish.text | 2 + 37 files changed, 398 insertions(+), 72 deletions(-) create mode 100644 tests/MMD6Tests/Citations.tex create mode 100644 tests/MMD6Tests/Dutch.tex create mode 100644 tests/MMD6Tests/English.tex create mode 100644 tests/MMD6Tests/French.tex create mode 100644 tests/MMD6Tests/German Guillemets.tex create mode 100644 tests/MMD6Tests/German.tex create mode 100644 tests/MMD6Tests/Swedish.tex diff --git a/src/html.c b/src/html.c index 2c836a2..fd5fd9e 100644 --- a/src/html.c +++ b/src/html.c @@ -1047,15 +1047,10 @@ void mmd_export_token_html(DString * out, const char * source, token * t, size_t citation_from_bracket(source, scratch, t, &temp_short); if (temp_bool) { - if (temp_short < scratch->used_citations->size) { - // Re-using previous citation - printf("[%s%s%d]", - temp_short, LC("see citation"), temp_char, temp_char2, temp_short); - } else { - // This is a new citation - printf("[%s%s%d]", - temp_short, temp_short, LC("see citation"), temp_char, temp_char2, temp_short); - } + // This is a new citation + temp_short = scratch->used_citations->size; + printf("[%s%s%d]", + temp_short, temp_short, LC("see citation"), temp_char, temp_char2, temp_short); } if (t->prev && (t->prev->type == PAIR_BRACKET)) { diff --git a/src/latex.c b/src/latex.c index c5abdeb..c73a419 100644 --- a/src/latex.c +++ b/src/latex.c @@ -810,51 +810,60 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat break; case PAIR_BRACKET_CITATION: parse_citation: - temp_bool = true; - - if (t->type == PAIR_BRACKET) { - // This is a locator for subsequent citation - temp_char = text_inside_pair(source, t); - temp_char2 = label_from_string(temp_char); - - if (strcmp(temp_char2, "notcited") == 0) { - free(temp_char2); - free(temp_char); - temp_char = strdup(""); - temp_bool = false; - } - - if (temp_char[0] == '\0') - temp_char2 = strdup(""); - else - temp_char2 = strdup(", "); - - - // Process the actual citation - t = t->next; - } else { - temp_char = strdup(""); - temp_char2 = strdup(""); - } - - if (scratch->extensions & EXT_NOTES) { + temp_bool = true; // Track whether this is a 'not cited' + temp_token = t; // Remember whether we need to skip ahead + + if (scratch->extensions & EXT_NOTES) { + if (t->type == PAIR_BRACKET) { + // This is a locator for subsequent citation (e.g. `[foo][#bar]` + temp_char = text_inside_pair(source, t); + temp_char2 = label_from_string(temp_char); + + if (strcmp(temp_char2, "notcited") == 0) { + free(temp_char); + temp_char = strdup(""); + temp_bool = false; + } + + free(temp_char2); + + // Process the actual citation + t = t->next; + } else { + // This is just a citation (e.g. `[#foo]`) + temp_char = strdup(""); + } + + // See if we're a citep or cite + temp_char2 = clean_inside_pair(source, t, false); + citation_from_bracket(source, scratch, t, &temp_short); - if (temp_bool) { - if (temp_short < scratch->used_citations->size) { - // Re-using previous citation - printf("\\citation{reuse"); + temp_note = stack_peek_index(scratch->used_citations, temp_short - 1); - printf("}"); + if (temp_bool) { + // This is not a "not cited" + if (temp_char[0] == '\0') { + if (temp_char2[strlen(temp_char2) - 1] == ';') { + print("\\citet"); + } else { + print("~\\citep"); + } } else { - // This is a new citation - printf("\\citation{"); - - printf("}"); + if (temp_char2[strlen(temp_char2) - 1] == ';') { + printf("\\citet[%s]", temp_char); + } else { + printf("~\\citep[%s]", temp_char); + } } + + printf("{%s}", temp_note->label_text); + } else { + // This is a "nocite" + printf("~\\nocite{%s}",temp_note->label_text); } - if (t->prev && (t->prev->type == PAIR_BRACKET)) { + if (temp_token != t) { // Skip citation on next pass scratch->skip_token = 1; } @@ -1241,3 +1250,37 @@ void mmd_end_complete_latex(DString * out, const char * source, scratch_pad * sc } +void mmd_export_citation_list_latex(DString * out, const char * source, scratch_pad * scratch) { + if (scratch->used_citations->size > 0) { + footnote * note; + token * content; + + pad(out, 2, scratch); + print("\\begin{thebibliography}{0}"); + scratch->padded = 0; + + for (int i = 0; i < scratch->used_citations->size; ++i) + { + // Export footnote + pad(out, 2, scratch); + + note = stack_peek_index(scratch->used_citations, i); + content = note->content; + + printf("\\bibitem{%s}\n", note->label_text); + scratch->padded = 6; + + scratch->footnote_para_counter = 0; + + content = note->content; + scratch->citation_being_printed = i + 1; + + mmd_export_token_tree_latex(out, source, content, scratch); + } + + pad(out, 1, scratch); + print("\\end{thebibliography}"); + scratch->padded = 0; + scratch->citation_being_printed = 0; + } +} diff --git a/src/latex.h b/src/latex.h index 0734a15..c755882 100644 --- a/src/latex.h +++ b/src/latex.h @@ -77,5 +77,7 @@ void mmd_export_footnote_list_latex(DString * out, const char * source, scratch_ void mmd_start_complete_latex(DString * out, const char * source, scratch_pad * scratch); void mmd_end_complete_latex(DString * out, const char * source, scratch_pad * scratch); +void mmd_export_citation_list_latex(DString * out, const char * source, scratch_pad * scratch); + #endif diff --git a/src/writer.c b/src/writer.c index 095d01b..0a801dd 100644 --- a/src/writer.c +++ b/src/writer.c @@ -1310,6 +1310,7 @@ void mmd_export_token_tree(DString * out, mmd_engine * e, short format) { mmd_start_complete_latex(out, e->dstr->str, scratch); mmd_export_token_tree_latex(out, e->dstr->str, e->root, scratch); + mmd_export_citation_list_latex(out, e->dstr->str, scratch); if (scratch->extensions & EXT_COMPLETE) mmd_end_complete_latex(out, e->dstr->str, scratch); @@ -1532,12 +1533,12 @@ void citation_from_bracket(const char * source, scratch_pad * scratch, token * t free(text); if (citation_id == -1) { - // No match, this is an inline footnote -- create a new one + // No match, this is an inline citation -- create a new one t->child->type = TEXT_EMPTY; t->child->mate->type = TEXT_EMPTY; - // Create footnote - footnote * temp = footnote_new(source, NULL, t->child); + // Create citation + footnote * temp = footnote_new(source, t, t->child); // Store as used stack_push(scratch->used_citations, temp); diff --git a/src/writer.h b/src/writer.h index b20b1f3..852fa3c 100644 --- a/src/writer.h +++ b/src/writer.h @@ -176,6 +176,7 @@ link * explicit_link(scratch_pad * scratch, token * label, token * url, const ch link * extract_link_from_stack(scratch_pad * scratch, const char * target); char * text_inside_pair(const char * source, token * pair); +char * clean_inside_pair(const char * source, token * t, bool lowercase); void link_free(link * l); void footnote_free(footnote * f); diff --git a/tests/MMD6Tests/Citations.html b/tests/MMD6Tests/Citations.html index 2de9e97..283988d 100644 --- a/tests/MMD6Tests/Citations.html +++ b/tests/MMD6Tests/Citations.html @@ -1,8 +1,30 @@ +

citep

+

[1]

-

[p. 123, 1]

+

[1][]

-

[1]

+

[p. 123, 1]

+ +

[1]

+ +

[foo\]\[bar, 1]

+ +

[1][2]

+ +

citet

+ +

[1]

+ +

[1][]

+ +

[p. 123, 1]

+ +

[1]

+ +

[foo\]\[bar, 1]

+ +

[1][2]

diff --git a/tests/MMD6Tests/Citations.htmlc b/tests/MMD6Tests/Citations.htmlc index 47e6648..307887a 100644 --- a/tests/MMD6Tests/Citations.htmlc +++ b/tests/MMD6Tests/Citations.htmlc @@ -1,9 +1,31 @@ +

citep

+

[#foo1]

+

[#foo1][]

+

[p. 123][#foo1]

[][#foo1]

+

[foo][bar][#foo1]

+ +

[#foo1][#foo2]

+ +

citet

+ +

[#foo1;]

+ +

[#foo1;][]

+ +

[p. 123][#foo1;]

+ +

[][#foo1;]

+ +

[foo][bar][#foo1;]

+ +

[#foo1;][#foo2;]

+

[Not Cited][#foo2]

[#foo1]: John Doe. A Totally Fake Book. Vanity Press, 2006.

diff --git a/tests/MMD6Tests/Citations.tex b/tests/MMD6Tests/Citations.tex new file mode 100644 index 0000000..d00c334 --- /dev/null +++ b/tests/MMD6Tests/Citations.tex @@ -0,0 +1,41 @@ +\part{citep } +\label{citep} + +~\citep{foo1} + +~\citep{foo1} + +~\citep[p. 123]{foo1} + +~\citep{foo1} + +~\citep[foo][bar]{foo1} + +~\citep{foo1}~\citep{foo2} + +\part{citet } +\label{citet} + +\citet{foo1} + +\citet{foo1} + +\citet[p. 123]{foo1} + +\citet{foo1} + +\citet[foo][bar]{foo1} + +\citet{foo1}\citet{foo2} + +~\nocite{foo2} + +\begin{thebibliography}{0} + +\bibitem{foo1} +John Doe. \emph{A Totally Fake Book}. Vanity Press, 2006. + +\bibitem{foo2} +John Doe. \emph{A Totally Fake Book}. Vanity Press, 2006. + +\end{thebibliography} diff --git a/tests/MMD6Tests/Citations.text b/tests/MMD6Tests/Citations.text index bd48666..a44c164 100644 --- a/tests/MMD6Tests/Citations.text +++ b/tests/MMD6Tests/Citations.text @@ -1,9 +1,33 @@ +# citep # + [#foo1] +[#foo1][] + [p. 123][#foo1] [][#foo1] +[foo\]\[bar][#foo1] + +[#foo1][#foo2] + + +# citet # + +[#foo1;] + +[#foo1;][] + +[p. 123][#foo1;] + +[][#foo1;] + +[foo\]\[bar][#foo1;] + +[#foo1;][#foo2;] + + [Not Cited][#foo2] [#foo1]: John Doe. *A Totally Fake Book*. Vanity Press, 2006. diff --git a/tests/MMD6Tests/Dutch.html b/tests/MMD6Tests/Dutch.html index ccb0e22..a406776 100644 --- a/tests/MMD6Tests/Dutch.html +++ b/tests/MMD6Tests/Dutch.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/Dutch.htmlc b/tests/MMD6Tests/Dutch.htmlc index 20decdc..1f1f746 100644 --- a/tests/MMD6Tests/Dutch.htmlc +++ b/tests/MMD6Tests/Dutch.htmlc @@ -16,4 +16,4 @@

[^foo]

-

[#bar]

+

#bar

diff --git a/tests/MMD6Tests/Dutch.tex b/tests/MMD6Tests/Dutch.tex new file mode 100644 index 0000000..4b1a6d6 --- /dev/null +++ b/tests/MMD6Tests/Dutch.tex @@ -0,0 +1,23 @@ +`foo' + +„foo'' + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/Dutch.text b/tests/MMD6Tests/Dutch.text index 8f13699..7fb8fb3 100644 --- a/tests/MMD6Tests/Dutch.text +++ b/tests/MMD6Tests/Dutch.text @@ -17,3 +17,5 @@ foo... [^foo] [#bar] + +[#bar]: foo diff --git a/tests/MMD6Tests/English.html b/tests/MMD6Tests/English.html index 5af9347..54f637d 100644 --- a/tests/MMD6Tests/English.html +++ b/tests/MMD6Tests/English.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/English.htmlc b/tests/MMD6Tests/English.htmlc index f5c2b7d..91ac103 100644 --- a/tests/MMD6Tests/English.htmlc +++ b/tests/MMD6Tests/English.htmlc @@ -16,4 +16,4 @@

[^foo]

-

[#bar]

+

#bar

diff --git a/tests/MMD6Tests/English.tex b/tests/MMD6Tests/English.tex new file mode 100644 index 0000000..6d34bd5 --- /dev/null +++ b/tests/MMD6Tests/English.tex @@ -0,0 +1,23 @@ +`foo' + +``foo'' + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/English.text b/tests/MMD6Tests/English.text index 9172ef1..28eeb2a 100644 --- a/tests/MMD6Tests/English.text +++ b/tests/MMD6Tests/English.text @@ -17,3 +17,5 @@ foo... [^foo] [#bar] + +[#bar]: foo diff --git a/tests/MMD6Tests/French.html b/tests/MMD6Tests/French.html index b27c02c..d5c1f89 100644 --- a/tests/MMD6Tests/French.html +++ b/tests/MMD6Tests/French.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/French.htmlc b/tests/MMD6Tests/French.htmlc index 4314734..2db85c0 100644 --- a/tests/MMD6Tests/French.htmlc +++ b/tests/MMD6Tests/French.htmlc @@ -16,4 +16,4 @@

[^foo]

-

[#bar]

+

#bar

diff --git a/tests/MMD6Tests/French.tex b/tests/MMD6Tests/French.tex new file mode 100644 index 0000000..7e09b97 --- /dev/null +++ b/tests/MMD6Tests/French.tex @@ -0,0 +1,23 @@ +'foo' + +«foo» + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/French.text b/tests/MMD6Tests/French.text index c496fbc..9a770b9 100644 --- a/tests/MMD6Tests/French.text +++ b/tests/MMD6Tests/French.text @@ -17,3 +17,5 @@ foo... [^foo] [#bar] + +[#bar]: foo diff --git a/tests/MMD6Tests/German Guillemets.html b/tests/MMD6Tests/German Guillemets.html index e9965fd..dc3f79b 100644 --- a/tests/MMD6Tests/German Guillemets.html +++ b/tests/MMD6Tests/German Guillemets.html @@ -12,16 +12,16 @@

foo…

-

[1]

+

[1]

-

[1]

+

[1]


  1. -

    foo  ↩

    +

    foo  ↩

@@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/German Guillemets.htmlc b/tests/MMD6Tests/German Guillemets.htmlc index c62c0af..ad86d1d 100644 --- a/tests/MMD6Tests/German Guillemets.htmlc +++ b/tests/MMD6Tests/German Guillemets.htmlc @@ -17,4 +17,4 @@ quotes language: germanguillemets

[^foo]

-

[#bar]

+

#bar

diff --git a/tests/MMD6Tests/German Guillemets.tex b/tests/MMD6Tests/German Guillemets.tex new file mode 100644 index 0000000..fa88f64 --- /dev/null +++ b/tests/MMD6Tests/German Guillemets.tex @@ -0,0 +1,23 @@ +›foo‹ + +»foo« + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/German Guillemets.text b/tests/MMD6Tests/German Guillemets.text index fada37f..22ef9a4 100644 --- a/tests/MMD6Tests/German Guillemets.text +++ b/tests/MMD6Tests/German Guillemets.text @@ -18,3 +18,5 @@ foo... [^foo] [#bar] + +[#bar]: foo diff --git a/tests/MMD6Tests/German.html b/tests/MMD6Tests/German.html index 26c893a..8031dc2 100644 --- a/tests/MMD6Tests/German.html +++ b/tests/MMD6Tests/German.html @@ -12,16 +12,16 @@

foo…

-

[1]

+

[1]

-

[1]

+

[1]


  1. -

    foo  ↩

    +

    foo  ↩

@@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    foo  ↩

diff --git a/tests/MMD6Tests/German.htmlc b/tests/MMD6Tests/German.htmlc index b13d0ee..a5c44b4 100644 --- a/tests/MMD6Tests/German.htmlc +++ b/tests/MMD6Tests/German.htmlc @@ -16,4 +16,4 @@

[^foo]

-

[#bar]

+

#bar

diff --git a/tests/MMD6Tests/German.tex b/tests/MMD6Tests/German.tex new file mode 100644 index 0000000..970d3d3 --- /dev/null +++ b/tests/MMD6Tests/German.tex @@ -0,0 +1,23 @@ +‚foo` + +„foo`` + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/German.text b/tests/MMD6Tests/German.text index c26c033..649acdf 100644 --- a/tests/MMD6Tests/German.text +++ b/tests/MMD6Tests/German.text @@ -17,3 +17,5 @@ foo... [^foo] [#bar] + +[#bar]: foo diff --git a/tests/MMD6Tests/Integrated.html b/tests/MMD6Tests/Integrated.html index 70814ce..00387d0 100644 --- a/tests/MMD6Tests/Integrated.html +++ b/tests/MMD6Tests/Integrated.html @@ -46,6 +46,8 @@ code

Cite.[1]

+

Cite.[2]

+

Links and Images

link and link

@@ -128,5 +130,10 @@ code

Inline Citation  ↩

+
  • +

    bar +  ↩

    +
  • +
    diff --git a/tests/MMD6Tests/Integrated.htmlc b/tests/MMD6Tests/Integrated.htmlc index 0bb4899..eef9f93 100644 --- a/tests/MMD6Tests/Integrated.htmlc +++ b/tests/MMD6Tests/Integrated.htmlc @@ -47,6 +47,8 @@ code

    Cite.[#Inline Citation]

    +

    Cite.#foo

    +

    Links and Images

    link and [link]

    diff --git a/tests/MMD6Tests/Integrated.tex b/tests/MMD6Tests/Integrated.tex index 26e7074..d8dc108 100644 --- a/tests/MMD6Tests/Integrated.tex +++ b/tests/MMD6Tests/Integrated.tex @@ -54,12 +54,14 @@ Foo.\footnote{This is an inline footnote} Bar.\footnote{And a reference footnote.} -Cite.\citesyntax TBD +Cite.~\citep{inlinecitation} + +Cite.~\citep{foo} \part{Links and Images } \label{linksandimages} -\href{http://foo.net/}{link}\footnote{\href{http://foo.net/}{http:/\slash foo.net\slash }} and \href{http://bar.net}{link}\footnote{\href{http://bar.net}{http:/\slash bar.net}} +\href{http://foo.net/}{link}\footnote{\href{http://foo.net/}{http:\slash \slash foo.net\slash }} and \href{http://bar.net}{link}\footnote{\href{http://bar.net}{http:\slash \slash bar.net}} \begin{figure}[htbp] \centering @@ -123,3 +125,13 @@ baz bat* \label{horizontalrules} \begin{center}\rule{3in}{0.4pt}\end{center} + +\begin{thebibliography}{0} + +\bibitem{inlinecitation} +Inline Citation + +\bibitem{foo} +bar + +\end{thebibliography} diff --git a/tests/MMD6Tests/Integrated.text b/tests/MMD6Tests/Integrated.text index 6f90471..3bdbb29 100644 --- a/tests/MMD6Tests/Integrated.text +++ b/tests/MMD6Tests/Integrated.text @@ -47,6 +47,10 @@ Bar.[^foot] Cite.[#Inline Citation] +Cite.[#foo] + +[#foo]: bar + # Links and Images # diff --git a/tests/MMD6Tests/Swedish.html b/tests/MMD6Tests/Swedish.html index 4f4cf74..c82f3b4 100644 --- a/tests/MMD6Tests/Swedish.html +++ b/tests/MMD6Tests/Swedish.html @@ -32,7 +32,7 @@
    1. -

      bar  ↩

      +

      foo  ↩

    diff --git a/tests/MMD6Tests/Swedish.htmlc b/tests/MMD6Tests/Swedish.htmlc index 014446c..bcf3220 100644 --- a/tests/MMD6Tests/Swedish.htmlc +++ b/tests/MMD6Tests/Swedish.htmlc @@ -16,4 +16,4 @@

    [^foo]

    -

    [#bar]

    +

    #bar

    \ No newline at end of file diff --git a/tests/MMD6Tests/Swedish.tex b/tests/MMD6Tests/Swedish.tex new file mode 100644 index 0000000..e081b02 --- /dev/null +++ b/tests/MMD6Tests/Swedish.tex @@ -0,0 +1,23 @@ +'foo' + +''foo'' + +foo's + +foo --- bar + +foo -- bar + +5 + +foo{\ldots} + +\footnote{foo} + +~\citep{bar} + +\begin{thebibliography}{0} + +\bibitem{bar} +foo +\end{thebibliography} diff --git a/tests/MMD6Tests/Swedish.text b/tests/MMD6Tests/Swedish.text index bd11d07..d5a789e 100644 --- a/tests/MMD6Tests/Swedish.text +++ b/tests/MMD6Tests/Swedish.text @@ -17,3 +17,5 @@ foo... [^foo] [#bar] + +[#bar]: foo -- 2.40.0