-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Gitlab seems to have slightly different rules for how it escapes spaces for it's anchor links: https://docs.gitlab.com/ee/user/markdown.html#header-ids-and-links
This causes the links generated for the index/TOC, to not work when a string has a hyphen surrounded by spaces e.g "/api/example - success"
Docgen will make a link such as: [/api/example - success](#apiexample-success)
However Gitlab will create an anchor ID such as: id=apiexample---success
I tried to look at the function that generates links, but I can't seem to find the source of the function:
Line 223 in 7c09b00
"glink": githubLink, |
I don't know what the right answer to this problem is, since changing the behavior will have a breaking effect for Markdown pages rendered by Github or Chrome where they seem to have slightly different behavior for the anchor tag links (header IDs). Maybe we can have a "gitlab" flag that allows the links to be generated/escaped using the same rules Gitlab follows?