Skip to content

Commit

Permalink
Fix light mode for language ids (#2617)
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief authored Oct 1, 2024
1 parent 173d64e commit 161a89a
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions src/core/generator/languageGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,19 @@ const setIconDefinitions = (
config: Config,
icon: DefaultIcon
) => {
manifest = createIconDefinitions(manifest, config, icon.name);
manifest = merge(
manifest,
icon.light
? createIconDefinitions(
manifest,
config,
icon.name + lightColorFileEnding
)
: manifest.light
);
manifest = merge(
manifest,
icon.highContrast
? createIconDefinitions(
manifest,
config,
icon.name + highContrastColorFileEnding
)
: manifest.highContrast
);
createIconDefinitions(manifest, config, icon.name);

if (icon.light) {
createIconDefinitions(manifest, config, icon.name + lightColorFileEnding);
}
if (icon.highContrast) {
createIconDefinitions(
manifest,
config,
icon.name + highContrastColorFileEnding
);
}

return manifest;
};

Expand All @@ -96,7 +88,6 @@ const createIconDefinitions = (
iconPath: `${iconFolderPath}${iconName}${fileConfigHash}.svg`,
};
}
return manifest;
};

const setLanguageIdentifiers = (iconName: string, languageIds: string[]) => {
Expand Down

0 comments on commit 161a89a

Please sign in to comment.