node_modules/svelte2tsx/index.js
/**
 * Special treatment for self-closing / void tags to make them conform to JSX.
 */
Special treatment for self-closing / void tags to make them conform to JSX.
Special treatment for self - closing / void tags to make them conform to JSX .
function handleElement(htmlx, str, node, parent, ifScope, templateScope) {
    const slotName = getSlotName(node);
    if (slotName) {
        handleSlot(htmlx, str, node, parent, slotName, ifScope, templateScope);
    }
    const voidTags = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'.split(',');
    if (voidTags.find((x) => x == node.name)) {
        if (htmlx[node.end - 2] != '/') {
            str.appendRight(node.end - 1, '/');
        }
    }
    if (htmlx[node.end - 1] != '>') {
        str.appendRight(node.end, `</${node.name}>`);
    }
}
function handleElement ( htmlx , str , node , parent , ifScope , templateScope ) { const slotName = getSlotName ( node ) ; if ( slotName ) { handleSlot ( htmlx , str , node , parent , slotName , ifScope , templateScope ) ; } const voidTags = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr' . split ( ',' ) ; if ( voidTags . find ( ( x ) => x == node . name ) ) { if ( htmlx [ node . end - 2 ] != '/' ) { str . appendRight ( node . end - 1 , '/' ) ; } } if ( htmlx [ node . end - 1 ] != '>' ) { str . appendRight ( node . end , ` ${ node . name } ` ) ; } }
Special treatment for self-closing / void tags to make them conform to JSX.
Special treatment for self - closing / void tags to make them conform to JSX .
//we just have to self close void tags since jsx always wants the /> //some tags auto close when they encounter certain elements, jsx doesn't support this