(themeName: string)
| 162 | themeName.trim().toLowerCase() |
| 163 | |
| 164 | const inferThemeFromName = (themeName: string): ThemeName | null => { |
| 165 | const normalized = normalizeThemeName(themeName) |
| 166 | |
| 167 | for (const hint of IDE_THEME_INFERENCE.dark) { |
| 168 | if (normalized.includes(hint)) { |
| 169 | return 'dark' |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | for (const hint of IDE_THEME_INFERENCE.light) { |
| 174 | if (normalized.includes(hint)) { |
| 175 | return 'light' |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | return null |
| 180 | } |
| 181 | |
| 182 | const stripJsonStyleComments = (raw: string): string => |
| 183 | raw.replace(/\/\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '') |
no test coverage detected