The reference list currently renders footnote numbers using built-in browser <li>. This is fragile but works in most simple cases. It's worth fixing so that we can guarantee accurate numbering—here is the list of known issues with the status quo (TODO: provide examples):
* visual editor numbering can be out of sync when template-produced references are present
* symbols can differ when browser rules aren't available for the content language
* numbers aren't included when copy-pasting from the reference list
The issue affects the legacy parser, Parsoid, and a separate code path in the visual editor.
Currently, rendering is done using two different mechanisms:
* Send a CSS variable holding the number as a string. A stylesheet applies this variable to the `li::marker`.
* Rely on browser `<ol>` `<li>` numbering, which fails for many use cases like custom groups and different alphabets.
Be aware that the numbering style includes some decoration around the number, which is specific by language, eg. "1)", "1.", "(1)" and so on.