Lines Matching refs:phrase
53 const phrase = match[1].trim();
54 if (!phrase || phrase === lastPhrase) {
57 lastPhrase = phrase;
64 const results = fuse.search(phrase, { limit: 10 });
65 displayResults(results, phrase, cursorPos);
81 function displayResults(results, phrase, cursorPos) { argument
119 div.addEventListener('click', () => selectResult(page.id, phrase));
160 function selectResult(pageId, phrase) { argument
162 const newLink = `[[${pageId}|${phrase}]]`;
163 const start = text.lastIndexOf(`[[${phrase}]]`);
164 … element.value = text.substring(0, start) + newLink + text.substring(start + phrase.length + 4);