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
Not all headers are automatically linked #367
Comments
I think I've seen this before and I think it happens when a page doesn't contain a top level I can't explain why it chooses the titles it does, that is strange. |
Just having a look at this - I think you managed to work around the problem? The current link looks great. If this still needs looking into, can you comment with a link to a problem area or provide some markdown with the issue. Thanks. |
I ended up just redoing the entire website using HTML links instead; this way, nothing gets linked at all, but I needed it for other requirements. However, it's still possible to reproduce: # Hello World (linked)
# Hello <code>World</code> (unlinked) |
Thanks - I've got a failing test case. The problem is using regular expressions to parse HTML which is never a good idea. Working on a fix. |
We now use HTMLParser rather than regular expressions which makes it much smarter about handling tags within the titles themselves. Fixes mkdocs#367
That was a pretty easy fix in the end :) Just waiting for CI to verify. Leaving this closed in favour of the PR, so check out #402 - it would be good if you could give it a test. |
I have an API reference site for a project that's hosted on ReadTheDocs using mkdocs as the documentation engine. Headers that contain things like
<code>
blocks aren't linked, while all others seem to be.I can reproduce this locally with a plain mkdocs install using the RTD theme.
Here's an example:
http://carbon.lpghatguy.com/en/latest/Classes/Collections.Tuple/
All three of the methods in that page should be automatically linked in the sidebar navigation, but only the one without any fancy decoration is. All of them have been given valid HTML ids, so they're possible to link, they just aren't.
The markdown for that page, which works around a couple RTD bugs and doesn't look that great, is here:
https://raw.githubusercontent.com/lua-carbon/carbon/master/docs/Classes/Collections.Tuple.md
The text was updated successfully, but these errors were encountered: