Files
notesnook/packages/core/utils/html-parser.js

7 lines
203 B
JavaScript
Raw Normal View History

2021-11-25 09:46:45 +05:00
import { parse } from "node-html-parser";
export const parseHTML =
typeof DOMParser === "undefined"
? (input) => parse(input)
: (input) => new DOMParser().parseFromString(input, "text/html");