|
@@ -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);
|
|
|
+ }
|
|
|
};
|