Skip to content

Commit b0662bd

Browse files
"for of paletteHexes" to be neater than "some".
it's more of a style thing given optimisations in the current engines making them pretty equal but...this is neater innit Signed-off-by: Toria <ninetailedtori@uwu.gal>
1 parent e75857e commit b0662bd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/build.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ function createDeclExtractPlugin(
5959
rule.walkDecls( ( decl: postcss.Declaration ) => {
6060
const valueLower = decl.value.toLowerCase();
6161

62-
if ( paletteHexes.some( ( hex ) => valueLower.includes( hex ) ) ) {
63-
decls.push( decl.clone() );
62+
for ( const hex of paletteHexes ) {
63+
if ( valueLower.includes( hex ) ) {
64+
decls.push( decl.clone() );
65+
break;
66+
}
6467
}
6568
} );
6669

src/theme-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function createCatppuccinHighlightStyle(
135135
color: colors.yellow.hex
136136
},
137137
{ tag: [ t.operator ], color: colors.sky.hex },
138-
{ tag: [ t.url, t.link ], color: colors.teal.hex },
138+
{ tag: [ t.url ], color: colors.teal.hex },
139139
{ tag: [ t.escape, t.regexp ], color: colors.pink.hex },
140140
{
141141
tag: [ t.meta, t.punctuation, t.separator, t.comment ],

0 commit comments

Comments
 (0)