-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Material uses IDs that are easy to conflict with. #790
Comments
Thanks for reporting. I would probably just add two underscores to all internally used IDs, so |
Sounds good. |
If I have the time, I may issue a pull for this. |
Fixed in a42fdb3, should be released soon. |
I decided to do a minor release as I consider this not being something that is customized quite often. 2.8.0 is out which includes all changes. |
Description
MkDocs Material injects a couple of ids that aren't expected. For instance in my document, the id
search
,drawer
,github
are all found in Material's header. I imagine there are at least a couple more that just aren't present in documents. The problem is that this isn't exactly expected, or intuitive to figure out. It is easy for a user to do the following, and none of of the links to work. And it won't be noticed until someone happens to click on anchors for the headers or the links referencing the header, and none of it work.A user would have to explicitly assign an id to the header that does not conflict. While I realize it is probably impossible to come up with a name no one could accidentally stumble upon, I feel like we could definitely make it more difficult.
Expected behavior
I would normally expect that id's for Material to be more difficult to happen upon so a user doesn't have to explicitly be aware of all ids that Material uses. Maybe something like
07328739847_search
, or something that would be fairly unique.Actual behavior
Unfortunately, Material uses very common ids that are easy to accidentally conflict with.
Steps to reproduce the bug
Search
. Header anchors and links referencing the header won't properly work.Package versions
Project configuration
NA
System information
The text was updated successfully, but these errors were encountered: