mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 02:06:10 +01:00
This commit is contained in:
parent
3a53fd4a9a
commit
fdee19e703
6 changed files with 16 additions and 15 deletions
|
|
@ -15,13 +15,15 @@ export const searchMarkRender = (protyle: IProtyle, matchElements: NodeListOf<El
|
|||
item.setAttribute("data-type", item.getAttribute("data-type").replace(" search-mark", "").replace("search-mark ", ""));
|
||||
range.selectNodeContents(item);
|
||||
}
|
||||
if (index === protyle.highlight.rangeIndex) {
|
||||
if (index === protyle.highlight.rangeIndex && !protyle.options.backlinkData) {
|
||||
protyle.highlight.markHL.add(range);
|
||||
} else {
|
||||
protyle.highlight.mark.add(range);
|
||||
}
|
||||
protyle.highlight.ranges.push(range);
|
||||
});
|
||||
CSS.highlights.set("search-mark", protyle.highlight.mark);
|
||||
CSS.highlights.set("search-mark-hl", protyle.highlight.markHL);
|
||||
CSS.highlights.set("search-mark-" + protyle.highlight.styleElement.dataset.uuid, protyle.highlight.mark);
|
||||
if (!protyle.options.backlinkData) {
|
||||
CSS.highlights.set("search-mark-hl-" + protyle.highlight.styleElement.dataset.uuid, protyle.highlight.markHL);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue