diff --git a/packages/mdx/mdx-ast-to-mdx-hast.js b/packages/mdx/mdx-ast-to-mdx-hast.js index c7c5b28ea..9c9ff2c86 100644 --- a/packages/mdx/mdx-ast-to-mdx-hast.js +++ b/packages/mdx/mdx-ast-to-mdx-hast.js @@ -29,12 +29,12 @@ module.exports = function mdxAstToMdxHast() { if (lang) { props.className = ['language-' + lang] } - - props.metaString = node.lang && node.lang.replace(langRegex, '').trim() + + props.metastring = node.lang && node.lang.replace(langRegex, '').trim() const meta = - props.metaString && - props.metaString.split(' ').reduce((acc, cur) => { + props.metastring && + props.metastring.split(' ').reduce((acc, cur) => { if (cur.split('=').length > 1) { const t = cur.split('=') acc[t[0]] = t[1] diff --git a/packages/mdx/test/index.test.js b/packages/mdx/test/index.test.js index 239172471..37251bcdb 100644 --- a/packages/mdx/test/index.test.js +++ b/packages/mdx/test/index.test.js @@ -82,7 +82,7 @@ COPY start.sh /home/start.sh ) expect(result).toContain( - `props={{"className":"language-dockerfile","metaString":"exec registry=something.com","exec":true,"registry":"something.com"}}` + `props={{"className":"language-dockerfile","metastring":"exec registry=something.com","exec":true,"registry":"something.com"}}` ) })