[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find features de... #141

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-i18n-rfc-md-ful into dev 2026-04-02 06:45:11 +00:00
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package i18n
import (
"maps"
"strconv"
"strings"
"text/template"
"unicode"
@ -742,7 +743,7 @@ func renderWordOrTitle(lang, word string) string {
// Quote wraps a string in double quotes.
func Quote(s string) string {
return `"` + s + `"`
return strconv.Quote(s)
}
// ArticlePhrase prefixes a noun phrase with the correct article.

View file

@ -511,6 +511,9 @@ func TestQuote(t *testing.T) {
if got := Quote("hello"); got != `"hello"` {
t.Errorf("Quote(%q) = %q, want %q", "hello", got, `"hello"`)
}
if got := Quote(`a "quoted" path\name`); got != `"a \"quoted\" path\\name"` {
t.Errorf("Quote(%q) = %q, want %q", `a "quoted" path\name`, got, `"a \"quoted\" path\\name"`)
}
}
func TestCaseHelpers(t *testing.T) {