From 7cc26576990aee898ee482eb91467e0683da91bf Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Fri, 5 Nov 2021 11:34:22 +0100 Subject: [PATCH] fix(highlight-code): fix regression code highlight behavior Refs #7603 --- src/core/components/highlight-code.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/components/highlight-code.jsx b/src/core/components/highlight-code.jsx index 95ebc70f416..61c3bd2283c 100644 --- a/src/core/components/highlight-code.jsx +++ b/src/core/components/highlight-code.jsx @@ -9,8 +9,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard" const HighlightCode = ({value, fileName, className, downloadable, getConfigs, canCopy, language}) => { const config = isFunction(getConfigs) ? getConfigs() : null - const canSyntaxHighlight = get(config, "syntaxHighlight.activated", true) - const highlighterStyle = getStyle(get(config, "syntaxHighlight.theme", "agate")) + const canSyntaxHighlight = get(config, "syntaxHighlight") !== false && get(config, "syntaxHighlight.activated", true) const rootRef = useRef(null) useEffect(() => { @@ -62,11 +61,11 @@ const HighlightCode = ({value, fileName, className, downloadable, getConfigs, ca ? {value} - :
{value}
+ :
{value}
}