tocss: Fix unquote case with double quotes

See #10555
This commit is contained in:
Septs 2022-12-21 10:24:13 +08:00 committed by Bjørn Erik Pedersen
parent d20d2651ea
commit 5d5f0a2371

View file

@ -38,7 +38,7 @@ func CreateVarsStyleSheet(vars map[string]string) string {
// These variables can be a combination of Sass identifiers (e.g. sans-serif), which
// should not be quoted, and URLs et, which should be quoted.
// unquote() is knowing what to do with each.
varsSlice = append(varsSlice, fmt.Sprintf("%s%s: unquote('%s');", prefix, k, v))
varsSlice = append(varsSlice, fmt.Sprintf("%s%s: unquote(%q);", prefix, k, v))
}
sort.Strings(varsSlice)
varsStylesheet = strings.Join(varsSlice, "\n")