-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
outdated/theme/markdownpr/breakingMerging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
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.
- GitHub: https://github.com/ResourcesCo/macchiato/blob/main/auth/indieauth.md#example0sign_ints
- GitLab: https://gitlab.com/ResourcesCo/macchiato/macchiato/-/blob/main/auth/indieauth.md#example0sign_ints
- Gitea adds dashes: https://gitea.com/ResourcesCo/macchiato/src/branch/main/auth/indieauth.md#example-0-sign_in-ts
- BitBucket prefixes (so do others, but they have JavaScript to make the anchors work): https://bitbucket.org/resourcesco/macchiato/src/main/auth/indieauth.md#markdown-header-example0sign_ints
- SourceHut adds
code
when the header is an inline code block: https://git.sr.ht/~benatkin/macchiato/tree/main/item/auth/indieauth.md#codeexample0sign_intscode
This 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
noerw and caesar
Metadata
Metadata
Assignees
Labels
outdated/theme/markdownpr/breakingMerging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.