Skip to content

Conversation

@m-j-w
Copy link
Contributor

@m-j-w m-j-w commented Mar 26, 2017

The README.md is currently not rendered correctly on GitHub due to the manual HTML anchors preceding the headlines. This effectively prevents the rendering engine from recognising the headlines. Since those anchors have been added some six years ago, and before GitHub introduced the feature of automatically creating anchors, they are now somewhat redundant.

This pull request contains two commits: 1) The first corrects the rendering by moving the manual anchors to below the headlines but keeps them for external sites; 2) the second commit completely removes these anchors and corrects links inside the README.md.

Main reason for the two commits is that the GitHub automatic anchors use lowercase only, the manually added however are mixed case. I'm unsure if and how generation of docs is affected and which external sites might require these anchors.

m-j-w added 2 commits March 26, 2017 10:09
Alternative approach to make GitHub correctly render the `README.md`
headlines by simply moving the manual anchors to below the headlines.
Since current manual anchors are uppercase, this keeps external links valid.
The `README.md` is currently rendered incorrectly on GitHub since it includes
manual HTML anchors for headlines.  However, since several years, GitHub
automatically includes these anchors.  Considering the anchors in the
README.md have been added some six years ago, the GitHub feature is probably
younger.

This removes all the manual anchors, for which all match the exact headline
pattern anyway, except the following which differ slightly:

- `<a name="Editor-Terminal-Setup"/>`
- `<a name="Platform-Specific-Notes"/>`
- `<a name="Required-Build-Tools-External-Libraries"/>`

If referenced from somewher externally, these would need to be updated.

Links within this README to anchors are also corrected.

The automatically generated anchors on GitHub follow the pattern of replacing
all spaces with `-` and everything being lowercase, e.g. `## This is a Title`
automatically gets the anchor equivalent to `<a name="this-is-a-title"/>`
to be referenced in markdown with `[Link to a title](#this-is-a-title)`.
Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

@ararslan ararslan merged commit 2f02df9 into JuliaLang:master Mar 26, 2017
@m-j-w m-j-w deleted the ReadmeAnchors branch March 26, 2017 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants