This commit is contained in:
zsviczian
2023-10-22 21:15:32 +02:00
parent 84af0c2d5c
commit 06475aea78
19 changed files with 208 additions and 73 deletions

View File

@@ -1,6 +1,6 @@
import { MarkdownRenderer, Modal, Notice, request } from "obsidian";
import ExcalidrawPlugin from "../main";
import { errorlog, log } from "../utils/Utils";
import { errorlog, escapeRegExp, log } from "../utils/Utils";
const URL =
"https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/index-new.md";
@@ -134,7 +134,7 @@ export class ScriptInstallPrompt extends Modal {
let lastIndex = 0;
let match;
const regex = new RegExp(searchTerm, 'gi');
const regex = new RegExp(escapeRegExp(searchTerm), 'gi');
// Iterate over all matches in the text node
while ((match = regex.exec(nodeContent)) !== null) {