feat(fontLoader): added the option to disable it on codeblocks (#154)
Some checks are pending
Sync to Codeberg / Sync Codeberg and Github (push) Waiting to run
Test / Test (push) Waiting to run

* feat(fontLoader): added the option to disable it on codeblocks

* feat(fontLoader): added the option to disable it on codeblocks
This commit is contained in:
vMohammad 2025-02-18 01:33:30 +03:00 committed by GitHub
parent 8ae70c490c
commit 037685bd2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}
});