diff options
author | 2022-05-31 17:17:36 +0000 | |
---|---|---|
committer | 2022-05-31 17:17:36 +0000 | |
commit | 9a31e6f1d500219881ae1c79f4d6fef2809ef247 (patch) | |
tree | 7c77edde3bc7d8d0c6b931e7e969dce1b87cb8d4 /packages/markdown/remark/src | |
parent | 119ecf8d469f034eaf1b1217523954d29f492cb6 (diff) | |
download | astro-9a31e6f1d500219881ae1c79f4d6fef2809ef247.tar.gz astro-9a31e6f1d500219881ae1c79f4d6fef2809ef247.tar.zst astro-9a31e6f1d500219881ae1c79f4d6fef2809ef247.zip |
[ci] format
Diffstat (limited to 'packages/markdown/remark/src')
-rw-r--r-- | packages/markdown/remark/src/rehype-jsx.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/markdown/remark/src/rehype-jsx.ts b/packages/markdown/remark/src/rehype-jsx.ts index 46c200b70..daeb4d56a 100644 --- a/packages/markdown/remark/src/rehype-jsx.ts +++ b/packages/markdown/remark/src/rehype-jsx.ts @@ -7,9 +7,8 @@ export default function rehypeJsx(): any { child.tagName = `${child.tagName}`; }); visit(node, MDX_ELEMENTS, (child: any, index: number | null, parent: any) => { - if (index === null || !Boolean(parent)) - return; - + if (index === null || !Boolean(parent)) return; + const attrs = child.attributes.reduce((acc: any[], entry: any) => { let attr = entry.value; if (attr && typeof attr === 'object') { |