fix: merge highlight options with `defu` (#409) · nuxt-content/mdc@babd9f1

Original file line numberDiff line numberDiff line change

@@ -53,10 +53,7 @@ export const createParseProcessor = async (inlineOptions: MDCParseOptions = {})

5353

if (inlineOptions.highlight === false) {

5454

delete options.rehype.plugins.highlight

5555

} else {

56-

options.rehype.plugins.highlight.options = {

57-

...(options.rehype.plugins.highlight.options || {}),

58-

...(options.highlight || {})

59-

}

56+

options.rehype.plugins.highlight.options = defu({}, options.rehype.plugins.highlight.options, options.highlight || {})

6057

}

6158

}

6259