Ihor Radchenko <yanta...@gmail.com> writes:

> 3. Instead of trying to find a silver bullet for human-readable anchor
>    generator, we allow users to customize it. The default will be
>    constant "org" yielding "org-Ajjq"-type anchors, just like we have
>    now. But we can also provide other generators, like the one Timothy
>    proposed, or better versions contributed in future if there is
>    demand.

Personally, I'd be wholly satisfied with a customization option; the
grail for me would be [pandoc's algorithm], which doesn't look too hard
to reimplement in one's config.

(Although the collision-handling logic could be tricky: since it
revolves around appending a counter to the ID, it needs to keep track of
how many times the same ID has been generated for the whole document.
If the generator API is just {heading ↦ ID}, i.e. there is no extra
"context" argument, one will need to do some bookkeeping "on the
side"…)

[pandoc's algorithm]: https://pandoc.org/MANUAL.html#extension-auto_identifiers

Reply via email to