diff options
Diffstat (limited to 'src/plugins/shikiCodeblocks/components')
-rw-r--r-- | src/plugins/shikiCodeblocks/components/Header.tsx | 2 | ||||
-rw-r--r-- | src/plugins/shikiCodeblocks/components/Highlighter.tsx | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/shikiCodeblocks/components/Header.tsx b/src/plugins/shikiCodeblocks/components/Header.tsx index c2db386..320dde9 100644 --- a/src/plugins/shikiCodeblocks/components/Header.tsx +++ b/src/plugins/shikiCodeblocks/components/Header.tsx @@ -33,7 +33,7 @@ export function Header({ langName, useDevIcon, shikiLang }: HeaderProps) { <div className={cl("lang")}> {useDevIcon !== DeviconSetting.Disabled && shikiLang?.devicon && ( <i - className={`devicon-${shikiLang.devicon}${useDevIcon === DeviconSetting.Color ? " colored" : ""}`} + className={`${cl("devicon")} devicon-${shikiLang.devicon}${useDevIcon === DeviconSetting.Color ? " colored" : ""}`} /> )} {langName} diff --git a/src/plugins/shikiCodeblocks/components/Highlighter.tsx b/src/plugins/shikiCodeblocks/components/Highlighter.tsx index d26cd81..badb3c8 100644 --- a/src/plugins/shikiCodeblocks/components/Highlighter.tsx +++ b/src/plugins/shikiCodeblocks/components/Highlighter.tsx @@ -90,14 +90,10 @@ export const Highlighter = ({ let langName; if (lang) langName = useHljs ? hljs?.getLanguage?.(lang)?.name : shikiLang?.name; - const preClasses = [cl("root")]; - if (!langName) preClasses.push(cl("plain")); - if (isPreview) preClasses.push(cl("preview")); - return ( <div ref={rootRef} - className={preClasses.join(" ")} + className={cl("root", { plain: !langName, preview: isPreview })} style={{ backgroundColor: useHljs ? themeBase.backgroundColor |