Describe the bug
When section headers start with a number, they are labeled in a confusing way by the auto-header anchor generator. They simply have the structure id<num>.
For example, a document like this:
Will generate anchors like:
<a class="headerlink" href="#v2-0" title="Permalink to this headline">
<a class="headerlink" href="#id1" title="Permalink to this headline">
I think users would instead expect the ID of the second element to be 2-0
Since we describe the behavior as based on the GitHub sluggify, I also quickly checked and it looks like they do support IDs that start with numbers (that's why I'm labeling this as a bug since I think it breaks from expected behavior based on that criteria).
I think the relevant code for this might be here:
https://github.com/executablebooks/mdit-py-plugins/blob/master/mdit_py_plugins/anchors/index.py#L119-L120
originally reported in: jupyterhub/kubespawner#575
Reproduce the bug
-
Set myst_heading_anchors = 2
-
Create a page like
-
Render it and note the heading IDs
List your environment
No response
Describe the bug
When section headers start with a number, they are labeled in a confusing way by the auto-header anchor generator. They simply have the structure
id<num>.For example, a document like this:
Will generate anchors like:
I think users would instead expect the ID of the second element to be
2-0Since we describe the behavior as based on the GitHub sluggify, I also quickly checked and it looks like they do support IDs that start with numbers (that's why I'm labeling this as a bug since I think it breaks from expected behavior based on that criteria).
I think the relevant code for this might be here:
https://github.com/executablebooks/mdit-py-plugins/blob/master/mdit_py_plugins/anchors/index.py#L119-L120
originally reported in: jupyterhub/kubespawner#575
Reproduce the bug
Set
myst_heading_anchors = 2Create a page like
Render it and note the heading IDs
List your environment
No response