Skip to content

Commit 3742d94

Browse files
committed
chore: upgrade deps
1 parent 7a2ebba commit 3742d94

File tree

3 files changed

+115
-23
lines changed

3 files changed

+115
-23
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
"wrangler": "^3.85.0"
106106
},
107107
"resolutions": {
108+
"remark-mdc": "npm:remark-mdc-edge@latest",
109+
"@nuxtjs/mdc": "npm:@nuxtjs/mdc-edge@latest",
108110
"@nuxt/content": "workspace:*",
109111
"@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@3623989",
110112
"vue": "^3.5.12"

pnpm-lock.yaml

Lines changed: 106 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/content/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,23 @@ async function _getHighlightPlugin(options: HighlighterOptions) {
100100
export async function parseContent(key: string, content: string, collection: ResolvedCollection, nuxt?: Nuxt) {
101101
const mdcOptions = (nuxt?.options as unknown as { mdc: MDCModuleOptions })?.mdc || {}
102102
const contentOptions = (nuxt?.options as unknown as { content: ModuleOptions })?.content?.build?.markdown || {}
103+
104+
const rehypeHighlightPlugin = contentOptions.highlight !== false
105+
? await getHighlightPluginInstance(defu(contentOptions.highlight as HighlighterOptions, mdcOptions.highlight, { compress: true }))
106+
: undefined
107+
103108
const parsedContent = await transformContent(key, content, {
104109
markdown: {
105110
compress: true,
106111
...mdcOptions,
107112
...contentOptions,
108113
rehypePlugins: {
109-
highlight: mdcOptions.highlight === false
110-
? undefined
111-
: await getHighlightPluginInstance({ ...mdcOptions.highlight, compress: (mdcOptions as { compress: boolean })?.compress !== false }),
114+
highlight: rehypeHighlightPlugin,
112115
...mdcOptions?.rehypePlugins,
113116
...contentOptions?.rehypePlugins,
114117
},
115118
remarkPlugins: {
119+
'remark-emoji': {},
116120
...mdcOptions?.remarkPlugins,
117121
...contentOptions?.remarkPlugins,
118122
},

0 commit comments

Comments
 (0)