import Nast from 'notajs-types/nast' import { CSS, NAST_BLOCK_TYPES } from '../constants' import { renderChildren, renderColor, renderTitle } from '../render-utils' function renderText(node: Nast.Text, renderNext: Function) { let blockColorClass = node.color ? renderColor(node.color) : '' let content = `\
${renderTitle(node.text, false, '')}
` let childrenContent = '' if (node.children.length > 0) { childrenContent = `\
${renderChildren(node.children, renderNext)}
` } return content + childrenContent } export default renderText