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 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.
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.
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.
Activity
d0ugal commentedon Mar 17, 2015
I think I've seen this before and I think it happens when a page doesn't contain a top level
# titleas yours doesn't - you add it with HTML directly.I can't explain why it chooses the titles it does, that is strange.
d0ugal commentedon Apr 2, 2015
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.
LPGhatguy commentedon Apr 3, 2015
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:
d0ugal commentedon Apr 3, 2015
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.
Refactor the TOC parsing code
d0ugal commentedon Apr 3, 2015
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.