aboutsummaryrefslogtreecommitdiff
path: root/test/command/853.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-03 22:23:01 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-03 22:23:01 +0100
commitfb47d1d90978110e778986a80f33a1d7438a4d35 (patch)
tree63f84a788ec7b0889c1c9f75ef31babec54eb786 /test/command/853.md
parentd18a1c1c9e6ebd83b1ce3b24a639c9478b4b62cb (diff)
downloadpandoc-fb47d1d90978110e778986a80f33a1d7438a4d35.tar.gz
RST reader: support RST-style citations.
The citations appear at the end of the document as a definition list in a special div with id `citations`. Citations link to the definitions. Added stateCitations to ParserState. Closes #853.
Diffstat (limited to 'test/command/853.md')
-rw-r--r--test/command/853.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/command/853.md b/test/command/853.md
new file mode 100644
index 000000000..54eb416a9
--- /dev/null
+++ b/test/command/853.md
@@ -0,0 +1,18 @@
+reStructuredText citations.
+
+```
+% pandoc -f rst
+Here is a citation reference: [CIT2002]_.
+
+.. [CIT2002] This is the citation. It's just like a footnote,
+ except the label is textual.
+^D
+<p>Here is a citation reference: <a href="#CIT2002" class="citation">[CIT2002]</a>.</p>
+<div id="citations">
+<dl>
+<dt><span id="CIT2002" class="citation-label">CIT2002</span></dt>
+<dd><p>This is the citation. It's just like a footnote, except the label is textual.</p>
+</dd>
+</dl>
+</div>
+```