aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/shikiCodeblocks/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/shikiCodeblocks/components')
-rw-r--r--src/plugins/shikiCodeblocks/components/Highlighter.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/shikiCodeblocks/components/Highlighter.tsx b/src/plugins/shikiCodeblocks/components/Highlighter.tsx
index 6067fd8..d86e772 100644
--- a/src/plugins/shikiCodeblocks/components/Highlighter.tsx
+++ b/src/plugins/shikiCodeblocks/components/Highlighter.tsx
@@ -42,6 +42,7 @@ export interface HighlighterProps {
lang?: string;
content: string;
isPreview: boolean;
+ tempSettings?: Record<string, any>;
}
export const createHighlighter = (props: HighlighterProps) => (
@@ -53,8 +54,13 @@ export const Highlighter = ({
lang,
content,
isPreview,
+ tempSettings,
}: HighlighterProps) => {
- const { tryHljs, useDevIcon, bgOpacity } = useShikiSettings(["tryHljs", "useDevIcon", "bgOpacity"]);
+ const {
+ tryHljs,
+ useDevIcon,
+ bgOpacity,
+ } = useShikiSettings(["tryHljs", "useDevIcon", "bgOpacity"], tempSettings);
const { id: currentThemeId, theme: currentTheme } = useTheme();
const shikiLang = lang ? resolveLang(lang) : null;