Skip to content

Commit

Permalink
fix: render attributes to html
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Feb 16, 2023
1 parent 82e30a0 commit c5d8a33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/with-markdoc/src/renderer/RenderNode.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import stringifyAttributes from 'stringify-attributes';
import type { AstroNode } from './astroNode';
type Props = {
Expand All @@ -19,7 +20,7 @@ const Node = (Astro.props as Props).node;
</Node.component>
) : (
<Fragment>
<Fragment set:html={`<${Node.tag}>`} />
<Fragment set:html={`<${Node.tag} ${stringifyAttributes(Node.attributes)}>`} />
{Node.children.map((child) => (
<Astro.self node={child} />
))}
Expand Down

0 comments on commit c5d8a33

Please sign in to comment.