Skip to content

Commit a8d5cf1

Browse files
committed
light-dark() function support for syntax highlight
Use CSS light-dark() function in Shiki configuration to enable automatic theme switching for code syntax highlighting based on user's color scheme preference.
1 parent c4cfa3e commit a8d5cf1

3 files changed

Lines changed: 40 additions & 39 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@logtape/sentry": "^0.1.0",
3434
"@sentry/core": "^8.47.0",
3535
"@sentry/node": "^8.47.0",
36-
"@shikijs/markdown-it": "^3.4.2",
36+
"@shikijs/markdown-it": "^3.5.0",
3737
"@supercharge/promise-pool": "^3.2.0",
3838
"argon2": "^0.41.1",
3939
"cheerio": "^1.0.0",

pnpm-lock.yaml

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/text.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const shiki = await Shiki({
4242
light: "one-light",
4343
dark: "one-dark-pro",
4444
},
45+
defaultColor: "light-dark()",
4546
});
4647

4748
export async function formatText(

0 commit comments

Comments
 (0)