From a9d1e3ccba5c8e0fc3723c7b0df4603c0fc50bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Tue, 27 Dec 2022 17:34:58 +0100 Subject: [PATCH] add anchors to download page sections and make sure they are not interpreted as inline comments by the ini parser --- build/merge-forgejo-locales.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/merge-forgejo-locales.go b/build/merge-forgejo-locales.go index 23f993bd89..b938934785 100644 --- a/build/merge-forgejo-locales.go +++ b/build/merge-forgejo-locales.go @@ -48,8 +48,8 @@ func renameGiteaForgejo(filename string) []byte { } else { out = append(out, []byte(strings.NewReplacer( "Gitea", "Forgejo", - "https://docs.gitea.io/en-us/install-from-binary/", "https://forgejo.org/download", - "https://github.com/go-gitea/gitea/tree/master/docker", "https://forgejo.org/download", + "https://docs.gitea.io/en-us/install-from-binary/", "https://forgejo.org/download/#installation-from-binary", + "https://github.com/go-gitea/gitea/tree/master/docker", "https://forgejo.org/download/#container-image", "https://docs.gitea.io/en-us/install-from-package/", "https://forgejo.org/download", "https://code.gitea.io/gitea", "https://forgejo.org/download", "code.gitea.io/gitea", "Forgejo", @@ -69,7 +69,9 @@ func main() { var localeFile *ini.File for _, locale := range locales { giteaLocale := sourceFolder + "gitea_" + locale - localeFile, err = ini.Load(giteaLocale, renameGiteaForgejo(giteaLocale)) + localeFile, err = ini.LoadSources(ini.LoadOptions{ + IgnoreInlineComment: true, + }, giteaLocale, renameGiteaForgejo(giteaLocale)) if err != nil { panic(err) }