]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tocss: Fix unquote case with double quotes
authorSepts <github@septs.pw>
Wed, 21 Dec 2022 02:24:13 +0000 (10:24 +0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 21 Dec 2022 10:21:07 +0000 (11:21 +0100)
See #10555

resources/resource_transformers/tocss/internal/sass/helpers.go

index 8128fd4d765a79d8fb7b118a0c188f27110be26b..ae1de7daa3dc94b60ae39a25d9e4e4df7cfe71bc 100644 (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")