aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-12-14 12:47:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2017-12-14 12:48:43 -0800
commitb94f1e2045d8113f57adabf6c4e475c744a8ce80 (patch)
tree6a14bee332fb881684ca62cf2efc1aa6c2337bbe /test
parent3361f85f8ea2d153d6f5457cbae511e33a09e994 (diff)
downloadpandoc-b94f1e2045d8113f57adabf6c4e475c744a8ce80.tar.gz
RST reader: more accurate parsing of references.
Previously we erroneously included the enclosing backticks in a reference ID (closes #4156). This change also disables interpretation of syntax inside references, as in docutils. So, there is no emphasis in `my *link*`_
Diffstat (limited to 'test')
-rw-r--r--test/command/4156.md10
-rw-r--r--test/command/rst-links.md18
2 files changed, 28 insertions, 0 deletions
diff --git a/test/command/4156.md b/test/command/4156.md
new file mode 100644
index 000000000..073537d1f
--- /dev/null
+++ b/test/command/4156.md
@@ -0,0 +1,10 @@
+```
+% pandoc -f rst
+.. _`SOMEID`:
+
+foo
+^D
+<div id="SOMEID">
+<p>foo</p>
+</div>
+```
diff --git a/test/command/rst-links.md b/test/command/rst-links.md
new file mode 100644
index 000000000..496bebc54
--- /dev/null
+++ b/test/command/rst-links.md
@@ -0,0 +1,18 @@
+```
+% pandoc -f rst
+`*ab*`_
+
+.. _`*ab*`: foo
+^D
+<p><a href="foo">*ab*</a></p>
+```
+
+```
+% pandoc -f rst
+`A B
+c`_
+
+.. _A B C: foo
+^D
+<p><a href="foo">A B c</a></p>
+```