aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorDavid A Roberts <d@vidr.cc>2017-05-03 20:19:45 +1000
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-03 12:19:45 +0200
commit79855ef934175c9a8890653375e05735d8b05a8d (patch)
treeb676575d58f59cfb1db24f911de634f2ad186034 /test/command
parent6e55e6837a38b83d0ed4329ab366c699d6c2551f (diff)
downloadpandoc-79855ef934175c9a8890653375e05735d8b05a8d.tar.gz
Markdown writer: better escaping for links (#3628)
Previously the Markdown writer would sometimes create links where there were none in the source. This is now avoided by selectively escaping bracket characters when they occur in a place where a link might be created. Closes #3619.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/3619.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/command/3619.md b/test/command/3619.md
new file mode 100644
index 000000000..62962c43b
--- /dev/null
+++ b/test/command/3619.md
@@ -0,0 +1,28 @@
+```
+% pandoc -f html -t markdown --reference-links
+<a href="foo">bar</a>: baz
+^D
+[bar][]: baz
+
+ [bar]: foo
+```
+
+```
+% pandoc -f html -t markdown --reference-links
+<a href="foo">bar</a>(baz)
+^D
+[bar][](baz)
+
+ [bar]: foo
+```
+
+```
+% pandoc -f html -t markdown_strict --reference-links
+<a href="a">foo</a><br/><a href="b">bar</a>
+^D
+[foo][]
+[bar]
+
+ [foo]: a
+ [bar]: b
+```