pandoc/test/command/3619.md
David A Roberts 79855ef934 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.
2017-05-03 12:19:45 +02:00

28 lines
374 B
Markdown

```
% 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
```