feat: simplify note title & headline extraction

This commit is contained in:
thecodrr
2021-12-16 10:10:00 +05:00
parent ad83938fa4
commit 3309b3d643
4 changed files with 29 additions and 22 deletions

View File

@@ -9,3 +9,7 @@ export function getDummyDocument() {
const doc = parseHTML("<div></div>");
return typeof DOMParser === "undefined" ? doc : doc;
}
export function getInnerText(element) {
return element.innerText || element.textContent;
}