summaryrefslogtreecommitdiff
path: root/mdsvex.config.js
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-02-09 00:47:32 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-02-09 00:47:32 +0300
commit2f74411118c35f0c9d852966af25e04b45dd3f53 (patch)
treec4ab5c61475294020832cc24bc2931a368fb3d0d /mdsvex.config.js
parent169ab22e65874ecfd9c047d60934220b60a86f15 (diff)
formatting and more perf
Diffstat (limited to 'mdsvex.config.js')
-rw-r--r--mdsvex.config.js37
1 files changed, 24 insertions, 13 deletions
diff --git a/mdsvex.config.js b/mdsvex.config.js
index 7476259..01e0da4 100644
--- a/mdsvex.config.js
+++ b/mdsvex.config.js
@@ -1,22 +1,33 @@
-import { createHighlighter } from 'shiki';
+import { createHighlighter } from "shiki";
const highlighter = await createHighlighter({
- themes: ['ayu-dark'],
- langs: ['javascript', 'typescript', 'svelte', 'html', 'css', 'bash', 'json', 'yaml', 'markdown', 'python']
+ themes: ["ayu-dark"],
+ langs: [
+ "javascript",
+ "typescript",
+ "svelte",
+ "html",
+ "css",
+ "bash",
+ "json",
+ "yaml",
+ "markdown",
+ "python",
+ ],
});
/** @type {import('mdsvex').MdsvexOptions} */
const mdsvexConfig = {
- extensions: ['.svx'],
- highlight: {
- highlighter: async (code, lang) => {
- const html = highlighter.codeToHtml(code, {
- lang: lang || 'text',
- theme: 'ayu-dark'
- });
- return `{@html \`${html.replace(/[{}`]/g, (c) => `&#${c.charCodeAt(0)};`)}\`}`;
- }
- }
+ extensions: [".svx"],
+ highlight: {
+ highlighter: async (code, lang) => {
+ const html = highlighter.codeToHtml(code, {
+ lang: lang || "text",
+ theme: "ayu-dark",
+ });
+ return `{@html \`${html.replace(/[{}`]/g, (c) => `&#${c.charCodeAt(0)};`)}\`}`;
+ },
+ },
};
export default mdsvexConfig;