import { ITagHandler , TagNode } from '@cc98/ubb-core' ; import { IContext } from '@cc98/context' ; import React from 'react' ; const handler = { isRecursive : true , render ( node , context , children ) { return < table className = "ubb-tag-table" > { children } < /table>; } , } ; export default handler ; param rawText export function parseTableTag ( rawText ) { let rowSpan = 1 ; let colSpan = 1 ; const tagContext = rawText . slice ( 4 , rawText . length - 1 ) ; const values = tagContext . split ( ',' ) ; if ( values . length === 2 ) { rowSpan = parseInt ( values [ 0 ] , 10 ) ; colSpan = parseInt ( values [ 1 ] , 10 ) ; } return { rowSpan , colSpan , } ; }