Skip to content

Commit

Permalink
fix: customize hilighter theme broken #227
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackman99 committed Feb 13, 2024
1 parent e469a61 commit af69ac0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/tender-moose-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@sveltepress/theme-default": patch
"@sveltepress/create": patch
"@sveltepress/vite": patch
---

fix: customize hilighter theme broken #227
2 changes: 1 addition & 1 deletion packages/theme-default/src/markdown/highlighter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const vitesseLight = JSON.parse(readFileSync(resolve(__dirname, './vitesse-light

async function createHighlighterWithThemeAndLangs(theme: any, langs: BundledLanguage[]) {
const shikiHighlighter = await getHighlighter({
themes: ['vitesse-light', 'night-owl'],
themes: [theme],
langs,
})
const highlighter: Highlighter = (code, lang) => shikiHighlighter.codeToHtml(code, { lang, theme })
Expand Down

0 comments on commit af69ac0

Please sign in to comment.