From 201cba65420e6fd40841c627a93e3ee52cbfd82a Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 5 Nov 2025 15:45:10 -0800 Subject: [PATCH] dirty --- src/ribbit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ribbit.ts b/src/ribbit.ts index 484ae1a..981ad71 100644 --- a/src/ribbit.ts +++ b/src/ribbit.ts @@ -56,6 +56,7 @@ for (const name of HTML5_TAGS) { (ribbitGlobals as any)[name] = (atNamed: {}, ...args: any[]) => tag(name, atNamed, ...args) ; (ribbitGlobals as any)[name].tagName = name } +; (ribbitGlobals as any)['text'].tagName = 'text' const tag = async (tagName: string, atNamed = {}, ...args: any[]) => { if (typeof args[0] === 'function') @@ -76,9 +77,10 @@ const tagBlock = async (tagName: string, props = {}, fn: Function) => { } const tagCall = (tagName: string, atNamed = {}, ...args: any[]) => { + console.log('tagCall:', { tagName, atNamed, args }) args = args.map(arg => typeof arg === 'function' ? arg.tagName : arg) - const attrs = Object.entries(atNamed).map(([key, value]) => `${key}="${value}"`) + const attrs = Object.entries(atNamed).map(([key, value]) => `${key}="${typeof value === 'function' ? (value as any).tagName : value}"`) const space = attrs.length ? ' ' : '' const children = args .reverse()