diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-05-21 11:31:38 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-05-21 12:19:59 -0400 |
commit | ed73bd28e511f72b17fc84126da85410e13b396b (patch) | |
tree | bd3a8351fa5015dddd24f82709ee3b7784a9bde4 /test | |
parent | 6208d4e7fcf1792203b3069d0002ad5cb1ec05dd (diff) | |
download | pandoc-ed73bd28e511f72b17fc84126da85410e13b396b.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/command/5495.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/command/5495.md b/test/command/5495.md new file mode 100644 index 000000000..37370ccab --- /dev/null +++ b/test/command/5495.md @@ -0,0 +1,18 @@ +``` +% 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 +``` |