See the Alamofire README for a great example of this. The table of contents at the start is full of relative links that don't work because the headings do not have id attributes, or anchors further down the document.
I don't think this is (easily) fixable client side, and I think it should probably be the responsibility of the Markdown parser. The way it works on GitHub is that the Markdown automatically generates anchor elements:
So, in the README.md, the heading for Donations is a simple heading:
The HTML generated looks like this:
It uses hyphens for spaces and lowercases everything. For example, the Resolved Radars generates this:
There are probably some more rules that I'm not considering, like apostrophes and other special characters.
Ideally, this would be an option on the GFM parser we're using. Let's check that before we implement anything custom.
See the Alamofire README for a great example of this. The table of contents at the start is full of relative links that don't work because the headings do not have
id
attributes, or anchors further down the document.I don't think this is (easily) fixable client side, and I think it should probably be the responsibility of the Markdown parser. The way it works on GitHub is that the Markdown automatically generates anchor elements:
So, in the README.md, the heading for Donations is a simple heading:
The HTML generated looks like this:
It uses hyphens for spaces and lowercases everything. For example, the Resolved Radars generates this:
There are probably some more rules that I'm not considering, like apostrophes and other special characters.
Ideally, this would be an option on the GFM parser we're using. Let's check that before we implement anything custom.
Follow-on from #410
The text was updated successfully, but these errors were encountered: