From 037685bd2bc85bb1edf5b3db0ee1b79708c59ae1 Mon Sep 17 00:00:00 2001 From: vMohammad <62218284+vMohammad24@users.noreply.github.com> Date: Tue, 18 Feb 2025 01:33:30 +0300 Subject: [PATCH] feat(fontLoader): added the option to disable it on codeblocks (#154) * feat(fontLoader): added the option to disable it on codeblocks * feat(fontLoader): added the option to disable it on codeblocks --- src/equicordplugins/fontLoader/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/equicordplugins/fontLoader/index.tsx b/src/equicordplugins/fontLoader/index.tsx index 283b9adf..f1e94699 100644 --- a/src/equicordplugins/fontLoader/index.tsx +++ b/src/equicordplugins/fontLoader/index.tsx @@ -91,7 +91,7 @@ const applyFont = async (fontFamily: string) => { --font-primary: '${fontFamily}', sans-serif !important; --font-display: '${fontFamily}', sans-serif !important; --font-headline: '${fontFamily}', sans-serif !important; - --font-code: '${fontFamily}', monospace !important; + ${settings.store.applyOnClodeBlocks ? "--font-code: '${fontFamily}', monospace !important;" : ""} } `; } catch (err) { @@ -185,6 +185,11 @@ const settings = definePluginSettings({ }} /> ) + }, + applyOnClodeBlocks: { + type: OptionType.BOOLEAN, + description: "Apply the font to code blocks", + default: false } });