import Nast from 'notajs-types/nast' import { CSS } from '../constants' import { renderColor, renderTitle } from '../render-utils' function renderHeading(node: Nast.Heading): string { let blockColorClass = node.color ? renderColor(node.color) : '' let textHTML = renderTitle(node.text, false, '') let content = '' if (node.depth < 6 && node.depth > 0) { content = `${textHTML}` } else { content = `
${textHTML}
` } let html = `\
${content}
` return html } export default renderHeading