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
I've noticed an unexpected behavior with the new anchor validation features where headers contain special characters, specifically "&".
Here is a reproducible sample with 1.6.0
mkdocs.yml:
site_name: Test Docsvalidation:
unrecognized_links: warnnot_found: warnanchors: warn
docs/index.md
# Title-[Title](#title)-[Sub-title](#sub-title)-[Conclusion & Future Work](#conclusion--future-work)## Sub-title## Conclusion & Future Work
And here's the error I get:
mkdocs serve --strict
INFO - Building documentation...
INFO - Cleaning site directory
WARNING - edit_uri: 'edit/main/docs/index.md' is not a valid URL, it should include the http:// (scheme)
WARNING - Doc file 'index.md' contains a link '#conclusion--future-work', but there is no such anchor on this page.
It's worth noting that it's a TOC generated by VSCode.
The text was updated successfully, but these errors were encountered:
Hello, thanks for the report :) Could you tell us what the actual anchor is when you serve your docs? VSCode probably doesn't slugify the same way as Python-Markdown does.
Yep, here's the anchor I get when serving my docs with a Conclusion & Future Work heading: #conclusion-future-work. In short, the anchors generated by VSCode do not match the ones generated by MkDocs. So the anchor validation warning is right. I'd recommend always checking the anchors by serving your docs and looking at them in a browser. I'll close this but feel free to comment further!
Hi and thank you for the great project!
I've noticed an unexpected behavior with the new anchor validation features where headers contain special characters, specifically "&".
Here is a reproducible sample with 1.6.0
mkdocs.yml
:docs/index.md
And here's the error I get:
It's worth noting that it's a TOC generated by VSCode.
The text was updated successfully, but these errors were encountered: