Open benatkin opened 3 years ago
I think we can take this as a breaking change for the next major release.
I believe we could have the same issue with slash (/
) character in headings, where gitea replaces it with dash (-
) in anchor, while github removes it.
Feature Description
Markdown anchors are generated from headings, and can be used relatively to link inside the code.
Gitea replaces spaces with dashes, while GitHub and GitLab omit the spaces.
GitHub and GitLab match, and Sourcehut mostly matches. I think it would be great if Gitea matched GitHub and GitLab, to ease the migration path.
code
when the header is an inline code block: https://git.sr.ht/~benatkin/macchiato/tree/main/item/auth/indieauth.md#codeexample0sign_intscodeThis change would break links on Gitea repos that use them, but this could be fixed by making it remove the dashes, since it's already using JavaScript to move from
#user-content-example-0-sign_in-ts
to#example-0-sign_in-ts
.I'm working on Markdown code notebooks so I will likely rely on this more than most, but relative anchor links are used in other projects.
Screenshots
No response