pandoc/test/command/5495.md
Jesse Rosenthal ed73bd28e5 Markdown writer: Handle labels with integer names
Previously if labels had integer names, it could produce a conflict
with auto-labeled reference links. Now we test for a conflict and find
the next available integer.

Note that this involves adding a new state variable `stPrevRefs` to
keep track of refs used in other document parts when using
`--reference-location=block|section`

Closes #5495
2019-05-21 12:19:59 -04:00

18 lines
277 B
Markdown

```
% pandoc -t markdown --reference-links
All because of [1](#one) link...
[This](#foo) will break Pandoc.
[This](#bar) will make you laugh.
^D
All because of [1] link...
[This] will break Pandoc.
[This][2] will make you laugh.
[1]: #one
[This]: #foo
[2]: #bar
```