This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ import fs from "fs";
88import themeNames from "./code_block_theme_names.json" with { type : "json" }
99import { t } from "i18next" ;
1010import { join } from "path" ;
11- import { getResourceDir } from "./utils.js" ;
12- import env from "./env.js" ;
11+ import utils from "./utils.js" ;
1312
1413/**
1514 * Represents a color scheme for the code block syntax highlight.
@@ -31,8 +30,8 @@ interface ColorTheme {
3130 * @returns the supported themes, grouped.
3231 */
3332export function listSyntaxHighlightingThemes ( ) {
34- const stylesDir = ( env . isDev ( ) ? "node_modules/@highlightjs/cdn-assets/styles" : "styles" ) ;
35- const path = join ( getResourceDir ( ) , stylesDir ) ;
33+ const stylesDir = ( ! utils . isElectron ( ) ? "node_modules/@highlightjs/cdn-assets/styles" : "styles" ) ;
34+ const path = join ( utils . getResourceDir ( ) , stylesDir ) ;
3635 const systemThemes = readThemesFromFileSystem ( path ) ;
3736
3837 return {
Original file line number Diff line number Diff line change @@ -364,5 +364,6 @@ export default {
364364 normalize,
365365 hashedBlobId,
366366 toMap,
367- isString
367+ isString,
368+ getResourceDir
368369} ;
You can’t perform that action at this time.
0 commit comments