mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-14 20:54:21 +01:00
Add .org condition to escapeSegToWeb
This commit is contained in:
parent
3931b8fc83
commit
36c23b8b8a
@ -76,7 +76,7 @@ func unescapeSegment(s string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func escapeSegToWeb(s string, hadDashMarker bool) string {
|
func escapeSegToWeb(s string, hadDashMarker bool) string {
|
||||||
if hadDashMarker || strings.Contains(s, "-") || strings.HasSuffix(s, ".md") {
|
if hadDashMarker || strings.Contains(s, "-") || strings.HasSuffix(s, ".md") || strings.HasSuffix(s, ".org") {
|
||||||
s = addDashMarker(s)
|
s = addDashMarker(s)
|
||||||
} else {
|
} else {
|
||||||
s = strings.ReplaceAll(s, " ", "-")
|
s = strings.ReplaceAll(s, " ", "-")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user