Skip to content

Commit

Permalink
🪪 Add id to span and div nodes (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwkoch authored Jul 31, 2024
1 parent 2778ea6 commit 7d8819d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-pandas-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'myst-to-react': patch
---

Add id to span/div nodes
4 changes: 2 additions & 2 deletions packages/myst-to-react/src/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ const BASIC_RENDERERS: BasicNodeRenderers = {
},
span({ node }) {
return (
<span className={node.class} style={node.style}>
<span className={node.class} style={node.style} id={node.html_id}>
<MyST ast={node.children} />
</span>
);
},
div({ node }) {
return (
<div className={node.class} style={node.style}>
<div className={node.class} style={node.style} id={node.html_id}>
<MyST ast={node.children} />
</div>
);
Expand Down

0 comments on commit 7d8819d

Please sign in to comment.