diff --git a/src/app.html b/src/app.html index 9eb809a..4bfaef6 100644 --- a/src/app.html +++ b/src/app.html @@ -3,7 +3,7 @@
- + %sveltekit.head% diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte index b3a84df..6b0a037 100644 --- a/src/routes/[slug]/+page.svelte +++ b/src/routes/[slug]/+page.svelte @@ -88,7 +88,7 @@ selectAll()} >{@html contents}
+ selectAll()} >{@html contents}
{/if}
diff --git a/src/utils/hljs.ts b/src/utils/hljs.ts index d283d37..56b8626 100644 --- a/src/utils/hljs.ts +++ b/src/utils/hljs.ts @@ -29,14 +29,13 @@ export const highlight = (code: string, lang: string | undefined = undefined) => }; -// Plugin to add line numbers hljs.addPlugin({ 'after:highlight': (result) => { const code = result.value.split('\n').map((line, index) => { const lineNumber = index + 1; const paddedLineNumber = String(lineNumber).padStart(5, ' '); - return `
${line}