Skip to content

Fix repository wiki markdown links - #8352

Open
landeqiming666 wants to merge 1 commit into
gogs:mainfrom
landeqiming666:improve-wiki-link-rendering
Open

Fix repository wiki markdown links#8352
landeqiming666 wants to merge 1 commit into
gogs:mainfrom
landeqiming666:improve-wiki-link-rendering

Conversation

@landeqiming666

@landeqiming666 landeqiming666 commented Jun 10, 2026

Copy link
Copy Markdown

Describe the pull request

Fix repository markdown links that intentionally point to wiki pages, for example wiki/Home, so they resolve to the repository wiki instead of being treated as source-relative repository paths.

The change keeps normal source-relative links under the repository source path and adds focused regression coverage for wiki links rendered from repository markdown.

Link to the issue: #2851

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan. (if applicable)
  • I have added an entry to CHANGELOG. (if applicable)

Test plan

  • GOMODCACHE=/private/tmp/gogs-2851-gomodcache GOCACHE=/private/tmp/gogs-2851-gocache GOPROXY=https://goproxy.cn,direct GOSUMDB=off go test -timeout 90s ./internal/markup -run Test_MarkdownRepoSourceWikiLinks -count=1 -v
  • GOMODCACHE=/private/tmp/gogs-2851-gomodcache GOCACHE=/private/tmp/gogs-2851-gocache GOPROXY=https://goproxy.cn,direct GOSUMDB=off go test -timeout 120s ./internal/markup -count=1
  • git diff --check HEAD~1..HEAD

@landeqiming666
landeqiming666 requested a review from unknwon as a code owner June 10, 2026 02:22
@unknwon

unknwon commented Jun 10, 2026

Copy link
Copy Markdown
Member

Please use PR template and reopen the PR.

@unknwon unknwon closed this Jun 10, 2026
@landeqiming666

Copy link
Copy Markdown
Author

Updated the PR body with the repository pull request template and reopened it. Thanks for the guidance.

@landeqiming666

Copy link
Copy Markdown
Author

Quick correction: I updated the PR body to match the repository pull request template, but GitHub did not allow me to reopen the PR from my side. Could a maintainer reopen it, or would you prefer that I open a fresh PR with the same branch and template body?

@landeqiming666

Copy link
Copy Markdown
Author

Follow-up: this original PR is open again, and the pull request body now uses the repository template with the test plan included. I also closed the duplicate replacement PR #8358 to keep the review focused here. Could you please continue the review on this PR when convenient?

@landeqiming666

Copy link
Copy Markdown
Author

Follow-up: PR #8352 is open again and the body follows the repository PR template, including the checklist and targeted/full markup tests. The CHANGELOG checkbox remains unchecked because this is a bug fix without a user-facing release-note entry.

The branch is ready for maintainer review; please let me know if any template, test, or implementation adjustment is still needed.

@landeqiming666
landeqiming666 force-pushed the improve-wiki-link-rendering branch from 203f9fe to 1b1a00f Compare July 13, 2026 04:22
@landeqiming666

Copy link
Copy Markdown
Author

Rebased onto the current main branch and re-ran the focused and package tests. go test ./internal/markup -count=1 passes, including repository-source wiki links and unchanged repository links. git diff --check also passes. Please take another look when convenient.

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.

2 participants