Skip to content

Fix Forgejo repo/view-source links #4706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 22, 2025

Conversation

aayush-tripathi
Copy link
Contributor

Closes #4688

This PR cleans up how the docs generator builds repository and View-Source URLs for Gitea-style hosts like Forgejo.

  • Trim trailing slashes so sidebar “Repository” and "View Source" links never contain an extra forward slash between the host and user.
  • Single line references emit #Lx instead of #Lx-Lx when start_line==end_line.
  • Updated existing tests to expect #Lx instead of #Lx-Lx.
  • Added a new test to assert no double-slash in Gitea/Forgejo repo URLs.

- Only emit `#Lx` instead of `#Lx-Lx` for single lines.
- Strip trailing slashes from Forgejo/Gitea Hosts
- "Repository" and "View-Source" links do not include `//`
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@lpil lpil merged commit e13bdc7 into gleam-lang:main Jun 22, 2025
12 checks passed
@aayush-tripathi aayush-tripathi deleted the fix-forgejo-source-links branch June 22, 2025 15:28
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.

Issues with View Source links in docs for forgejo repositories
2 participants