fix(client/vite): build errors due to mark.js

This commit is contained in:
Elian Doran
2025-05-16 21:06:21 +03:00
parent 016d59fae1
commit e23400bec1
5 changed files with 162 additions and 67 deletions

View File

@@ -21,7 +21,7 @@ export default class FindInHtml {
}
async performFind(searchTerm: string, matchCase: boolean, wholeWord: boolean) {
await import("script-loader!mark.js/dist/jquery.mark.min.js");
await import("mark.js");
const $content = await this.parent?.noteContext?.getContentElement();
@@ -42,7 +42,7 @@ export default class FindInHtml {
const containerTop = scrollingContainer?.getBoundingClientRect().top ?? 0;
const closestIndex = this.$results.toArray().findIndex(el => el.getBoundingClientRect().top >= containerTop);
this.currentIndex = closestIndex >= 0 ? closestIndex : 0;
await this.jumpTo();
res({