fix(themes): yarn nerdfont 3.x icon codepoint

This commit is contained in:
Mateusz Bajorek 2023-10-30 14:07:31 +01:00 committed by Jan De Dobbeleer
parent 9003be7be0
commit 4b1fbb8860
3 changed files with 4 additions and 2 deletions

View file

@ -56,6 +56,8 @@ func TestEscapeGlyphs(t *testing.T) {
{Input: "\ufd03", Expected: "\\ufd03"}, {Input: "\ufd03", Expected: "\\ufd03"},
{Input: "}", Expected: "}"}, {Input: "}", Expected: "}"},
{Input: "🏚", Expected: "🏚"}, {Input: "🏚", Expected: "🏚"},
{Input: "\U000F011B", Expected: "\\udb80\\udd1b"},
{Input: "󰄛", Expected: "\\udb80\\udd1b"},
} }
for _, tc := range cases { for _, tc := range cases {
assert.Equal(t, tc.Expected, escapeGlyphs(tc.Input, false), tc.Input) assert.Equal(t, tc.Expected, escapeGlyphs(tc.Input, false), tc.Input)

View file

@ -55,7 +55,7 @@ func (n *Node) loadContext() {
return return
} }
if n.language.env.HasFiles("yarn.lock") { if n.language.env.HasFiles("yarn.lock") {
n.PackageManagerIcon = n.language.props.GetString(YarnIcon, "\uF011B") n.PackageManagerIcon = n.language.props.GetString(YarnIcon, "\U000F011B")
return return
} }
if n.language.env.HasFiles("package-lock.json") || n.language.env.HasFiles("package.json") { if n.language.env.HasFiles("package-lock.json") || n.language.env.HasFiles("package.json") {

View file

@ -1500,7 +1500,7 @@
"type": "string", "type": "string",
"title": "Yarn Icon", "title": "Yarn Icon",
"description": "Icon/text to use for Yarn", "description": "Icon/text to use for Yarn",
"default": " \uF011B" "default": " \udb80\udd1b"
}, },
"npm_icon": { "npm_icon": {
"type": "string", "type": "string",