Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Never give two headings the same anchor
A repeat's count was keyed on the bare text, so a heading whose text already ended in that count took the same anchor, as "Twice 1" did after two of "Twice", and "About 1" after "About". A link to either then landed on the first. The count now goes on up past any anchor already handed out, the way GitHub's slugger does.
-rw-r--r--custom/extensions/about-render.lua19
-rw-r--r--tests/extensions/test-about-render.lua10
2 files changed, 23 insertions, 6 deletions