discourse/test/javascripts/helpers/parse-html.js.es6

9 lines
266 B
JavaScript

/* global Tautologistics */
export default function parseHTML(rawHtml) {
const builder = new Tautologistics.NodeHtmlParser.HtmlBuilder();
const parser = new Tautologistics.NodeHtmlParser.Parser(builder);
parser.parseComplete(rawHtml);
return builder.dom;
}