-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Make autolinking issues and PRs in markdown files configurable #33639
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The change is from #26365, to match GitHub behavior. The workaround is "using full URL link" ...... See GitHub: |
That's understandable, but would it be possible to add a configuration option for this? It would be quite a lot of work to manually replace all the autolinks with a real link, and we'd need to update our development tooling to generate real links. It was very convenient how e.g. commit messages and PR titles could previously be copied as-is into a changelog file, and it'd just work. |
I could try if I get time. If you are able to build your own binary program, you could apply this patch (only 1 line): diff --git a/models/repo/repo.go b/models/repo/repo.go
index c5060a419f..d1fd8d4982 100644
--- a/models/repo/repo.go
+++ b/models/repo/repo.go
@@ -537,6 +537,7 @@ func (repo *Repository) ComposeDocumentMetas(ctx context.Context) map[string]str
// does document(file) need the "teams" and "org" from common metas?
metas := maps.Clone(repo.composeCommonMetas(ctx))
metas["markdownLineBreakStyle"] = "document"
+ metas["markupAllowShortIssuePattern"] = "true"
return metas
} Then
Then mount the docker volume to host:
Then use your own binary to replace |
Thank you very much for the patch, that works great! |
Description
Previously, in at least 1.19.3, linking to PRs and issues with e.g.
#123
in a markdown file resulted in them being autolinked when the markdown was rendered, but in 1.23.3 (and the dev version at demo.gitea.com), this is no longer the case.I reproduced this in a testing instance with the following docker compose (and whatever defaults it gave in the install step), just changing the version from 1.19.3 to 1.23.3.
And just for completeness, here's the README.md seen in the screenshot:
linking issue #1
Even if this is intentional, it would be nice if the previous behavior could be re-enabled with a configuration option. I couldn't find any issues, PRs, or release notes about this topic.
Reproduced on demo.gitea.com: https://demo.gitea.com/neonmoe/testing-repo
Gitea Version
1.23.3
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Both demo.gitea.com and using the docker-compose config I pasted in the main issue description.
Database
SQLite
The text was updated successfully, but these errors were encountered: