diff --git a/completions.js b/completions.js index b7e2a41..0a1a770 100644 --- a/completions.js +++ b/completions.js @@ -991,24 +991,14 @@ completions.md = { completions.md.callback = (response) => { const res = JSON.parse(response.text) - return res.documents.map((s) => { - let excerpt = escape(s.excerpt) - if (excerpt.length > 240) { - excerpt = `${excerpt.slice(0, 240)}…` - } - res.query.split(" ").forEach((q) => { - excerpt = excerpt.replace(new RegExp(q, "gi"), "$&") - }) - const title = escape(s.title) - const slug = escape(s.slug) - return createSuggestionItem(` + return res.documents.map((s) => + createSuggestionItem(`