f7398eea by Adam Heath

Support 'string' components for matching, which then get directly

rendered.
1 parent fbafd335
......@@ -18,10 +18,11 @@ for (const [ matcher, handler ] of replacers) {
}
const nextDebug = debug ? debug - 1 : 0
const [ Component, componentArgs ] = Array.isArray(slotName) ? slotName : []
const [ Component, componentArgs, componentContent ] = Array.isArray(slotName) ? slotName : []
---
{
Component ? (<Component {...componentArgs} debug={nextDebug} replacers={replacers} slotHandler={slotHandler}/>)
typeof Component === 'string' ? <Component {...node.attributes} {...componentArgs}>{componentContent}</Component>
: Component ? (<Component {...componentArgs} debug={nextDebug} replacers={replacers} slotHandler={slotHandler}/>)
: slotName ? slotHandler(slotName, node, special)
: <Node parent={parent} node={node} index={index} debug={nextDebug} replacers={replacers} slotHandler={slotHandler} special={special}/>
}
......