import {isNamedSection, MarkMark} from './types' export class HtmlRenderer { public render(mm: MarkMark): string { let mmLines: string[] = [] for ( const section of mm.sections ) { mmLines.push('
') // if this section has a title/description, write those out if ( isNamedSection(section) ) { mmLines.push(`

${section.title}

`) if ( section.description ) { mmLines.push(`

${section.description}

`) } } mmLines.push('') mmLines.push('
') } return mmLines.join('\n') } }