Context
No response
Bug description
I am in love with the way one can link to certain line numbers from the markdown:
Here we [handle the `version`](#__codelineno-8-2:9) CLI flag.
The problem I am having is that codelineno-8-2:9 is not a persisten id of the code block element.
If we add a code block before the one in question, its ID will auto-increment and the link won't work anymore.
Since pymarkdownx snippet extension allows to assign user-defined ID it is possible to have a static reference to the code block, that is agnostic to the document layout.
``` {.python #myid linenums="1"}
import bar
```
The problem is that #myid id assigned to the code block is not "respected" by the mkdocs-material, so that when one uses #__codelineno-myid-7 the relevant line does not get highlighted, although the span elements have that ID.
Related links
Reproduction
9.4.14+insiders.4.46.0-code-block-custom-id.zip
Steps to reproduce
launch the reproduction, open /blog/2023/11/11/bar/ page and click on the links at the bottom of the page.
Browser
No response
Before submitting
Context
No response
Bug description
I am in love with the way one can link to certain line numbers from the markdown:
The problem I am having is that
codelineno-8-2:9is not a persisten id of the code block element.If we add a code block before the one in question, its ID will auto-increment and the link won't work anymore.
Since pymarkdownx snippet extension allows to assign user-defined ID it is possible to have a static reference to the code block, that is agnostic to the document layout.
The problem is that
#myidid assigned to the code block is not "respected" by the mkdocs-material, so that when one uses#__codelineno-myid-7the relevant line does not get highlighted, although the span elements have that ID.Related links
Reproduction
9.4.14+insiders.4.46.0-code-block-custom-id.zip
Steps to reproduce
launch the reproduction, open
/blog/2023/11/11/bar/page and click on the links at the bottom of the page.Browser
No response
Before submitting