import { escape } from '../utils/string'; class TextParser { source: any; constructor(source: any) { this.source = source; } toHTML() { let html = escape(this.source); html = html .replace(/\n/g, '
') .replace(/
<\/p>/g, '
') >= 0) { html = '
'.concat(html, '
'); } return html; } } export default TextParser;