(tokens: Token[], block: Format, cursor: ICursor)
| 156 | } |
| 157 | |
| 158 | output(tokens: Token[], block: Format, cursor: ICursor) { |
| 159 | const children: VNode[] = tokens.reduce( |
| 160 | (acc, token) => [ |
| 161 | ...acc, |
| 162 | ...this.dispatch(snakeToCamel(token.type), { |
| 163 | h, |
| 164 | cursor, |
| 165 | block, |
| 166 | token, |
| 167 | }), |
| 168 | ], |
| 169 | [] as VNode[], |
| 170 | ); |
| 171 | const vNode = h('span', children); |
| 172 | const rawHtml = toHTML(vNode); |
| 173 | |
| 174 | return rawHtml.replace(/^<span>([\s\S]*)<\/span>$/g, (_, p) => p); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | export default Renderer; |
no test coverage detected