mirror of
https://github.com/zadam/trilium.git
synced 2025-12-19 13:54:23 +01:00
fix(highlights_list): empty results
This commit is contained in:
parent
57081a1bfb
commit
a4024d17ba
@ -137,7 +137,7 @@ function extractHighlightsFromTextEditor(editor: CKTextEditor) {
|
||||
if (!root) return [];
|
||||
|
||||
for (const { item } of editor.model.createRangeIn(root).getWalker({ ignoreElementEnd: true })) {
|
||||
if (!item.is('$textProxy')) continue;
|
||||
if (!item.is('$textProxy') || !item.data.trim()) continue;
|
||||
|
||||
const attrs: RawHighlight["attrs"] = {
|
||||
bold: item.hasAttribute('bold'),
|
||||
@ -198,7 +198,7 @@ function extractHeadingsFromStaticHtml(el: HTMLElement | null) {
|
||||
let node: Node | null;
|
||||
while ((node = walker.nextNode())) {
|
||||
const el = node.parentElement;
|
||||
if (!el || !node.textContent) continue;
|
||||
if (!el || !node.textContent?.trim()) continue;
|
||||
|
||||
const style = getComputedStyle(el);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user