We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07f2c45 commit 3053029Copy full SHA for 3053029
packages/mdx/src/plugins/rehype/rehypeSyntaxHighlighting.ts
@@ -138,6 +138,11 @@ export const rehypeSyntaxHighlighting: Plugin<[RehypeSyntaxHighlightingOptions?]
138
}
139
});
140
141
+ if (node.data?.meta) {
142
+ node.data.meta = node.data.meta.replace(lineHighlightPattern, '').trim();
143
+ }
144
+ codeElement.data = node.data;
145
+ if (codeElement.children[0]) codeElement.children[0].data = node.data;
146
parent.children.splice(index, 1, codeElement);
147
} catch (err) {
148
if (options.ignoreMissing && /Unknown language/.test((err as Error).message)) {
0 commit comments