ed73bd28e5
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
18 lines
277 B
Markdown
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
|
|
```
|