aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-17 11:58:27 +0800
committerGitHub <noreply@github.com>2024-12-17 11:58:27 +0800
commite98dd6ee5b0efb8e7a9f992fa35903cf5b2c1634 (patch)
tree447fd5c0387d2b71f19f4ffaaa0a1e22d918bb1b /modules
parent22c4599542ee3e10bcab4c9136467bbac8e90ba0 (diff)
downloadgitea-e98dd6ee5b0efb8e7a9f992fa35903cf5b2c1634.tar.gz
gitea-e98dd6ee5b0efb8e7a9f992fa35903cf5b2c1634.zip
Backport 1.23 (#32868)
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'modules')
-rw-r--r--modules/markup/markdown/markdown.go3
-rw-r--r--modules/repository/fork.go3
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go
index a14c0cad59..b5fffccdb9 100644
--- a/modules/markup/markdown/markdown.go
+++ b/modules/markup/markdown/markdown.go
@@ -129,7 +129,8 @@ func SpecializedMarkdown(ctx *markup.RenderContext) *GlodmarkRender {
Enabled: setting.Markdown.EnableMath,
ParseDollarInline: true,
ParseDollarBlock: true,
- ParseSquareBlock: true, // TODO: this is a bad syntax, it should be deprecated in the future (by some config options)
+ ParseSquareBlock: true, // TODO: this is a bad syntax "\[ ... \]", it conflicts with normal markdown escaping, it should be deprecated in the future (by some config options)
+ // ParseBracketInline: true, // TODO: this is also a bad syntax "\( ... \)", it also conflicts, it should be deprecated in the future
}),
meta.Meta,
),
diff --git a/modules/repository/fork.go b/modules/repository/fork.go
index d530634071..84ed4b23d6 100644
--- a/modules/repository/fork.go
+++ b/modules/repository/fork.go
@@ -12,6 +12,9 @@ import (
"code.gitea.io/gitea/modules/setting"
)
+// CanUserForkBetweenOwners returns true if user can fork between owners.
+// By default, a user can fork a repository from another owner, but not from themselves.
+// Many users really like to fork their own repositories, so add an experimental setting to allow this.
func CanUserForkBetweenOwners(id1, id2 int64) bool {
if id1 != id2 {
return true