feat: improve code block parsing
This commit is contained in:
parent
2bf4f8913a
commit
8dd91002d7
8 changed files with 39 additions and 17 deletions
|
@ -1,15 +1,20 @@
|
|||
// Vitest Snapshot v1
|
||||
|
||||
exports[`content-rich > code frame 1`] = `
|
||||
"<p>Testing code block</p>
|
||||
<pre lang=\\"ts\\">
|
||||
import { useMouse, usePreferredDark } from '@vueuse/core'
|
||||
"<p>Testing code block</p><p><pre lang=\\"ts\\">import { useMouse, usePreferredDark } from '@vueuse/core'
|
||||
|
||||
// tracks mouse position
|
||||
const { x, y } = useMouse()
|
||||
// is the user prefers dark theme
|
||||
const isDark = usePreferredDark()</pre
|
||||
>
|
||||
<p></p>
|
||||
const isDark = usePreferredDark()</pre></p>"
|
||||
`;
|
||||
|
||||
exports[`content-rich > code frame 2 1`] = `
|
||||
"<p>
|
||||
<span class=\\"h-card\\"><a class=\\"u-url mention\\" to=\\"/@antfu@mas.to\\"></a></span>
|
||||
Testing<br />
|
||||
<pre lang=\\"ts\\">const a = hello</pre>
|
||||
</p>
|
||||
"
|
||||
`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue