You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Determined nav/heading title includes attribute list when only referencing via file instead giving manually title (Should not if attr_list extension enabled)
#3136
Closed
hendrikp opened this issue
Mar 4, 2023
· 0 comments
· Fixed by #3191
I'm using the attr_list markdown extension to provide language neutral anchor's so I can define/reference each language section with the same anchor ids. This works great for the autogenerated TOC, the markdown links, images and more.
One thing that doesn't work is the autogenerated heading text (neither when specifying file, nor when using wildcard nav plugins, or when autoincluding the full doc dir).
It results in the following headings being generated in the sample provided below:
in German doc Hallo Welt { #introduction } linking to the correct md/html file, should be just Hallo Welt
in English doc Hello World { #introduction } linking to the correct md/html file, should be just Hello World
My suggestion would be to substitute the regexp-pattern \s*?\{.*?\}\s*?$ from the determined heading texts for the nav+page title if the attr_list plugin is enabled (or in general). This would exclude/remove all attributes from a heading (a more advanced version could maybe retain the attribute class etc, but not really needed).
The text was updated successfully, but these errors were encountered:
hendrikp
changed the title
Determined nav/heading title includes attribute list when only referencing via file instead giving manually title (When attr_list extension enabled)
Determined nav/heading title includes attribute list when only referencing via file instead giving manually title (Should not if attr_list extension enabled)
Mar 4, 2023
I'm using the attr_list markdown extension to provide language neutral anchor's so I can define/reference each language section with the same anchor ids. This works great for the autogenerated TOC, the markdown links, images and more.
One thing that doesn't work is the autogenerated heading text (neither when specifying file, nor when using wildcard nav plugins, or when autoincluding the full doc dir).
It results in the following headings being generated in the sample provided below:
Hallo Welt { #introduction }
linking to the correct md/html file, should be justHallo Welt
Hello World { #introduction }
linking to the correct md/html file, should be justHello World
My suggestion would be to substitute the regexp-pattern
\s*?\{.*?\}\s*?$
from the determined heading texts for the nav+page title if the attr_list plugin is enabled (or in general). This would exclude/remove all attributes from a heading (a more advanced version could maybe retain the attribute class etc, but not really needed).I will see if i can submit a MR.
mkdocs.yml
docs/en/somefile.md
mkdocs.de.yml
docs/de/somefile.md
The text was updated successfully, but these errors were encountered: