miyakogi / m2r

Markdown to reStructuredText converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hyperlinking to a header within the same markdown page breaks the id of the header

CorrieBartonVualto opened this issue · comments

I've noticed an issue when trying to link to a section within the same markdown file breaks the id.

For example, if I have this section:

## Current Trends

The link to it will be #current-trends. If however, I add this at the top of the page:

* [Current Trends](#current-trends)

the link to that header now becomes #id1.

From doing a few tests, it looks like its the text used for the hyperlink that causes issues. So because I set the link text to Current Trends and the header has the same name, it breaks it. I could use * [Current Trends](#id1) and it would work. But I'd like the header ids to have meaning