Description
I am using the markdown extension attr_list and data attribute data-toc-label to shorten long headings that make up a document's TOC (h2 - h6). Unfortunately, the data attribute doesn't seem to be compatible with the built-in typeset plugin. As soon as the plugin is active, the data attribute is removed but the TOC representation does not change.
Context
Sadly, I am unable to create a reproduction using insiders, as the current beta is recognized as newer. Unfortunately, as of now, the typeset plugin is only available using insiders > 4.27.0:
ERROR - Please upgrade to the latest version.
When reporting issues, please first upgrade to the latest
version of Material for MkDocs, as the problem might already
be fixed in the latest version. This helps reduce duplicate
efforts and saves us maintainers time.
Please update from 9.1.21+insiders.4.38.0 to 9.2.0b2.
pip install --upgrade --force-reinstall mkdocs-material
However, using this minimal mkdocs.yml in combination with the following heading will produce my findings. Disabling the typeset plugin will produce a shortened TOC heading.
site_name: My Docs
theme:
name: material
plugins:
- typeset
markdown_extensions:
- attr_list
## Very long heading that spans across multiple TOC lines { data-toc-label="Short heading that fits the TOC" }
Related links
Use Cases
I have long document headings (h2 - h6) that make up a document's TOC which, if left as is, extend over multiple lines. This makes them harder to grasp when skimming over the TOC. I used to shorten such headings for the TOC and would like to continue to do so when using the built-in typeset plugin.
Visuals
No response
Before submitting
Description
I am using the markdown extension
attr_listand data attributedata-toc-labelto shorten long headings that make up a document's TOC (h2 - h6). Unfortunately, the data attribute doesn't seem to be compatible with the built-intypesetplugin. As soon as the plugin is active, the data attribute is removed but the TOC representation does not change.Context
Sadly, I am unable to create a reproduction using insiders, as the current beta is recognized as newer. Unfortunately, as of now, the
typesetplugin is only available using insiders > 4.27.0:However, using this minimal
mkdocs.ymlin combination with the following heading will produce my findings. Disabling thetypesetplugin will produce a shortened TOC heading.Related links
attr_listextensionUse Cases
I have long document headings (h2 - h6) that make up a document's TOC which, if left as is, extend over multiple lines. This makes them harder to grasp when skimming over the TOC. I used to shorten such headings for the TOC and would like to continue to do so when using the built-in
typesetplugin.Visuals
No response
Before submitting