mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
feat: migrate to node-html-parser
This commit is contained in:
6
packages/core/utils/html-parser.js
Normal file
6
packages/core/utils/html-parser.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { parse } from "node-html-parser";
|
||||
|
||||
export const parseHTML =
|
||||
typeof DOMParser === "undefined"
|
||||
? (input) => parse(input)
|
||||
: (input) => new DOMParser().parseFromString(input, "text/html");
|
||||
Reference in New Issue
Block a user