mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-27 06:00:15 +03:00
feat(build): uniform ini parsing (#7429)
- Use the existing ini parser for the `lint-locale` and `lint-locale-usage` tooling. - This discovered that the previous ini parser was not correctly parsing certain types of string, specifically those with `;` as it's seen as a comment. It now properly 'unescapes' that and is not seen as a comment break. - Discovered-by: @fogti Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7429 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
4ab40ed6af
commit
ba5b157f7e
2 changed files with 4 additions and 9 deletions
|
@ -60,7 +60,7 @@ func TestLocalizationPolicy(t *testing.T) {
|
|||
t.Run("Escaped HTML characters", func(t *testing.T) {
|
||||
assert.Empty(t, checkLocaleContent([]byte("activity.git_stats_push_to_branch = `إلى %s و\"`")))
|
||||
|
||||
assert.Equal(t, []string{"key: و\x1b[31m \x1b[0m\x1b[32m\u00a0\x1b[0m"}, checkLocaleContent([]byte(`key = و `)))
|
||||
assert.Equal(t, []string{"key: و\x1b[31m \x1b[0m\x1b[32m\u00a0\x1b[0m"}, checkLocaleContent([]byte(`key = و `)))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue