A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang. (PERSONAL FORK)
1export const removeFoldHeading = (nodeElement: Element) => {
2 const nodeH = parseInt(nodeElement.getAttribute("data-subtype").substr(1));
3 let nextElement = nodeElement.nextElementSibling;
4 while (nextElement) {
5 const currentH = parseInt(nextElement.getAttribute("data-subtype")?.substr(1));
6 if (!nextElement.classList.contains("protyle-attr") && // 超级块末尾为属性
7 (isNaN(currentH) || currentH > nodeH)) {
8 const tempElement = nextElement;
9 nextElement = nextElement.nextElementSibling;
10 tempElement.remove();
11 } else {
12 break;
13 }
14 }
15};