Minstrel
Minstrel

Reputation: 379

Markdown : internal link to section doesn't work

This works :

See [java](#java) configuration
..
### Java

This doesn't work :

See [web.xml](#web-app-web.xml) configuration
..
### Web app web.xml

so why ? :)

Upvotes: 3

Views: 1935

Answers (1)

Waylan
Waylan

Reputation: 42487

As documented in their github/markup project, GitHub runs all user supplied markup through various filters, including the TableOfContentsFilter. The filter isn't fully documented, but a quick read through the code suggests that to create an id, the text of a header is filtered by having...

  1. all characters converted to lowercase ASCII characters;
  2. all punctuation (except hyphens and spaces) removed; and
  3. all spaces replaced with hyphens.

Running the text Web app web.xml through such a filter will result in web-app-webxml. That being the case, your document should look like this:

See [web.xml](#web-app-webxml) configuration
..
### Web app web.xml

Upvotes: 5

Related Questions