Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 259cb64

Browse files
authored
trim the value of html node
html node value starts with space will generate a <undefined> DOM when working with gatsby-plugin-mdx
1 parent d0adc27 commit 259cb64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = ({ markdownAST }, pluginOptions) => {
1313
} ${properties}>
1414
<code slot="code">${_.escape(text)}</code>
1515
</deckgo-highlight-code>
16-
`;
16+
`.trim();
1717

1818
node.type = "html";
1919
node.children = undefined;

0 commit comments

Comments
 (0)