Skip to content

Commit 9d02c23

Browse files
committed
Babel: fix references as children being left as string variable names
1 parent 312d921 commit 9d02c23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/babel.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ export default function htmBabelPlugin({ types: t }, options = {}) {
8989
child = child.trim();
9090
}
9191
if (typeof child==='string') {
92+
const matches = child.match(/\$\$\$_h_\[(\d+)\]/);
93+
if (matches) return currentExpressions[matches[1]];
9294
return stringValue(child);
9395
}
9496
return child;

0 commit comments

Comments
 (0)