mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 06:32:33 +01:00
This commit is contained in:
parent
04806ea4b9
commit
594e7f8cee
7 changed files with 36 additions and 29 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export const searchMarkRender = (protyle: IProtyle, matchElements: NodeListOf<Element>) => {
|
||||
if (matchElements.length === 0 || !CSS || !CSS.highlights) {
|
||||
export const searchMarkRender = (protyle: IProtyle, keys: string[]) => {
|
||||
if (!isSupportCSSHL()) {
|
||||
return;
|
||||
}
|
||||
protyle.highlight.markHL.clear();
|
||||
|
|
@ -30,7 +30,11 @@ export const searchMarkRender = (protyle: IProtyle, matchElements: NodeListOf<El
|
|||
|
||||
|
||||
export const searchTextMarkRender = (element: HTMLElement, k: string[]) => {
|
||||
if (!CSS || !CSS.highlights) {
|
||||
if (!isSupportCSSHL()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
export const isSupportCSSHL = () => {
|
||||
return !!(CSS && CSS.highlights);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue