Ben Schlegel
2023-09-01 23f43045c49f17fe5ace480f7026855acf2a30b8
fix(search): matches getting highlighted in title (#440)

1 files modified
2 ■■■ changed files
quartz/components/scripts/search.inline.ts 2 ●●● patch | view | raw | blame | history
quartz/components/scripts/search.inline.ts
@@ -157,7 +157,7 @@
    return {
      id,
      slug,
      title: highlight(term, data[slug].title ?? ""),
      title: searchType === "tags" ? data[slug].title : highlight(term, data[slug].title ?? ""),
      // if searchType is tag, display context from start of file and trim, otherwise use regular highlight
      content:
        searchType === "tags"