mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
This commit is contained in:
parent
f024e3b07d
commit
6a7fb4ad61
2 changed files with 8 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import {Constants} from "../../constants";
|
||||
|
||||
export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolean) => {
|
||||
export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolean, cb?: () => void) => {
|
||||
if (!isSupportCSSHL()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -76,6 +76,9 @@ export const searchMarkRender = (protyle: IProtyle, keys: string[], isHL: boolea
|
|||
if (isHL) {
|
||||
CSS.highlights.set("search-mark-hl-" + protyle.highlight.styleElement.dataset.uuid, protyle.highlight.markHL);
|
||||
}
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
}, protyle.wysiwyg.element.querySelector(".hljs") ? Constants.TIMEOUT_TRANSITION : 0);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue