Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pngwn committed Aug 15, 2024
1 parent b4a152d commit 30336be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"test:filter": "uvu -r ts-node/register",
"release": "pnpm -r build && changeset publish",
"changeset:add": "changeset add",
"changeset:version": "changeset version && pnpm i --lockfile-only"
"changeset:version": "changeset version && pnpm i --lockfile-only",
"site:dev": "pnpm --filter @mdsvex/site dev",
"site:build": "pnpm --filter @mdsvex/site build"
},
"keywords": [
"test",
Expand Down
2 changes: 1 addition & 1 deletion packages/site/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mdsvex-playground",
"name": "@mdsvex/site",
"description": "Documentation side for mdsvex",
"version": "0.0.1",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/site/src/routes/_docs.svtext
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ Frontmatter also interacts with layouts, you can find more details in the [Layou

You can use shiki for highlighting rather than prism by leveraging the `highlighter` option:

```js
```js
import { mdsvex, escapeSvelte } from 'mdsvex';
import { createHighlighter } from 'shiki';

Expand All @@ -692,7 +692,7 @@ const mdsvexOptions = {
highlight: {
highlighter: async (code, lang = 'text') => {
const html = escapeSvelte(highlighter.codeToHtml(code, { lang, theme }));
return `{@html \`${html}\` }`;
return `{@html \\`${html}\\` }`;
}
},
}
Expand Down

0 comments on commit 30336be

Please sign in to comment.