From da1a5a461c2cf668b83027e65b7d92b11a3f91d4 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Tue, 1 Nov 2022 14:54:28 -0400 Subject: [PATCH] test: add rst citations and footnote (#267) --- tests/fixtures/test_rst_citations.html | 22 ++++++++++++ tests/fixtures/test_rst_citations.rst | 18 ++++++++++ tests/fixtures/test_rst_footnotes.html | 48 ++++++++++++++++++++++++++ tests/fixtures/test_rst_footnotes.rst | 29 ++++++++++++++++ 4 files changed, 117 insertions(+) create mode 100644 tests/fixtures/test_rst_citations.html create mode 100644 tests/fixtures/test_rst_citations.rst create mode 100644 tests/fixtures/test_rst_footnotes.html create mode 100644 tests/fixtures/test_rst_footnotes.rst diff --git a/tests/fixtures/test_rst_citations.html b/tests/fixtures/test_rst_citations.html new file mode 100644 index 0000000..5cf2019 --- /dev/null +++ b/tests/fixtures/test_rst_citations.html @@ -0,0 +1,22 @@ +

Citation references, like [CIT2002]. +Note that citations may get +rearranged, e.g., to the bottom of +the “page”.

+
+
+[CIT2002] +

A citation +(as often used in journals).

+
+
+

Citation labels contain alphanumerics, +underlines, hyphens and fullstops. +Case is not significant.

+

Given a citation like [this], one +can also refer to it like this.

+
+
+[this] +

here.

+
+
diff --git a/tests/fixtures/test_rst_citations.rst b/tests/fixtures/test_rst_citations.rst new file mode 100644 index 0000000..b5ab36a --- /dev/null +++ b/tests/fixtures/test_rst_citations.rst @@ -0,0 +1,18 @@ +.. Citations https://docutils.sourceforge.io/docs/user/rst/quickref.html#citations + +Citation references, like [CIT2002]_. +Note that citations may get +rearranged, e.g., to the bottom of +the "page". + +.. [CIT2002] A citation + (as often used in journals). + +Citation labels contain alphanumerics, +underlines, hyphens and fullstops. +Case is not significant. + +Given a citation like [this]_, one +can also refer to it like this_. + +.. [this] here. diff --git a/tests/fixtures/test_rst_footnotes.html b/tests/fixtures/test_rst_footnotes.html new file mode 100644 index 0000000..1def78a --- /dev/null +++ b/tests/fixtures/test_rst_footnotes.html @@ -0,0 +1,48 @@ +

Footnote references, like [5]. +Note that footnotes may get +rearranged, e.g., to the bottom of +the “page”.

+ +

Autonumbered footnotes are +possible, like using [1] and [2].

+ +

They may be assigned ‘autonumber +labels’ - for instance, +[4] and [3].

+ +

Auto-symbol footnotes are also +possible, like this: [*] and [].

+ diff --git a/tests/fixtures/test_rst_footnotes.rst b/tests/fixtures/test_rst_footnotes.rst new file mode 100644 index 0000000..656484a --- /dev/null +++ b/tests/fixtures/test_rst_footnotes.rst @@ -0,0 +1,29 @@ +.. Footnotes https://docutils.sourceforge.io/docs/user/rst/quickref.html#footnotes + +Footnote references, like [5]_. +Note that footnotes may get +rearranged, e.g., to the bottom of +the "page". + +.. [5] A numerical footnote. Note + there's no colon after the ``]``. + +Autonumbered footnotes are +possible, like using [#]_ and [#]_. + +.. [#] This is the first one. +.. [#] This is the second one. + +They may be assigned 'autonumber +labels' - for instance, +[#fourth]_ and [#third]_. + +.. [#third] a.k.a. third_ + +.. [#fourth] a.k.a. fourth_ + +Auto-symbol footnotes are also +possible, like this: [*]_ and [*]_. + +.. [*] This is the first one. +.. [*] This is the second one.