From 03a24607286df5a402a0bdd9e43c4f79ba2c95fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateus=20Felipe=20Gon=C3=A7alves?= Date: Mon, 12 Dec 2022 08:49:27 -0300 Subject: [PATCH] feat(rehype): add dark and light theme to rehype-pretty-code --- src/lib/rehypePrettyCode.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/rehypePrettyCode.ts b/src/lib/rehypePrettyCode.ts index e01776ea..1ff7b6b9 100644 --- a/src/lib/rehypePrettyCode.ts +++ b/src/lib/rehypePrettyCode.ts @@ -1,7 +1,10 @@ import { type Options } from 'rehype-pretty-code' export const rehypePrettyCodeOptions: Partial = { - theme: 'github-light', + theme: { + dark: 'github-dark', + light: 'github-light' + }, onVisitLine(node) { // Prevent lines from collapsing in `display: grid` mode, and // allow empty lines to be copy/pasted