summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-17 16:23:33 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-17 16:23:33 +0200
commit7b3aaee15ab69cdf3125a214c2124b91622af759 (patch)
treec182d28a85da49d9884657806258440fcddbbdf8 /test
parent61e965b117bf8cc60d30f7f44582ed8b4bb2b9e1 (diff)
Markdown writer: Fixed duplicated reference links
with `--reference-links` and `--reference-location=section`. Also ensure that there are no empty link references `[]`. Closes #3674.
Diffstat (limited to 'test')
-rw-r--r--test/command/3674.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/command/3674.md b/test/command/3674.md
new file mode 100644
index 000000000..09f4e0d1e
--- /dev/null
+++ b/test/command/3674.md
@@ -0,0 +1,26 @@
+Make sure we don't get duplicate reference links, even with
+`--reference-location=section`.
+
+```
+% pandoc --reference-links -t markdown --reference-location=section --atx-headers
+# a
+
+![](a)
+
+# b
+
+![](b)
+
+^D
+# a
+
+![][1]
+
+ [1]: a
+
+# b
+
+![][2]
+
+ [2]: b
+```