diff options
author | David A Roberts <d@vidr.cc> | 2017-05-03 20:19:45 +1000 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-05-03 12:19:45 +0200 |
commit | 79855ef934175c9a8890653375e05735d8b05a8d (patch) | |
tree | b676575d58f59cfb1db24f911de634f2ad186034 /test/command | |
parent | 6e55e6837a38b83d0ed4329ab366c699d6c2551f (diff) | |
download | pandoc-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.md | 28 |
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 +``` |