summaryrefslogtreecommitdiff
path: root/packages/markdown/remark/src/rehype-jsx.ts
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2021-10-29 12:45:32 -0700
committerGravatar GitHub <noreply@github.com> 2021-10-29 14:45:32 -0500
commit34e03cf912161abd5ca66fd12ce458d51d011855 (patch)
treeaf33b1cf19ddd45b4c6effbf8c25b8f74d2e7c23 /packages/markdown/remark/src/rehype-jsx.ts
parent93489946ccd59c27d85cc9fa3a255edf6efeb861 (diff)
downloadastro-34e03cf912161abd5ca66fd12ce458d51d011855.tar.gz
astro-34e03cf912161abd5ca66fd12ce458d51d011855.tar.zst
astro-34e03cf912161abd5ca66fd12ce458d51d011855.zip
do not format vite (#1710)
* Revert "[ci] yarn format" This reverts commit 93489946ccd59c27d85cc9fa3a255edf6efeb861. * chore: ignore vendor
Diffstat (limited to 'packages/markdown/remark/src/rehype-jsx.ts')
-rw-r--r--packages/markdown/remark/src/rehype-jsx.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/markdown/remark/src/rehype-jsx.ts b/packages/markdown/remark/src/rehype-jsx.ts
index 94632efed..c5270e2af 100644
--- a/packages/markdown/remark/src/rehype-jsx.ts
+++ b/packages/markdown/remark/src/rehype-jsx.ts
@@ -5,22 +5,22 @@ export default function rehypeJsx(): any {
return function (node: any): any {
return map(node, (child: any) => {
if (child.type === 'element') {
- return { ...child, tagName: `${child.tagName}` };
+ return { ...child, tagName: `${child.tagName}` }
}
if (MDX_ELEMENTS.has(child.type)) {
- return {
+ return {
...child,
type: 'element',
tagName: `${child.name}`,
properties: child.attributes.reduce((acc: any[], entry: any) => {
let attr = entry.value;
if (attr && typeof attr === 'object') {
- attr = `{${attr.value}}`;
+ attr = `{${attr.value}}`
} else if (attr === null) {
- attr = `{true}`;
+ attr = `{true}`
}
return Object.assign(acc, { [entry.name]: attr });
- }, {}),
+ }, {})
};
}
return child;