Aiden Bai
2022-05-27 bc32bbeaed10eac3094fcaa899ca626dc8e56771
assets/js/search.js
@@ -38,7 +38,8 @@
      .replace(/(#{1,6})\s+(.+)\1?/g, '<b>$2</b>')
      .replace(/\s{0,2}\[.*?\]: .*?$/g, '')
      .replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? '$1' : '')
      .replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1')
      .replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '<a>$1</a>')
      .replace(/!?\[\[\S[^\[\]\|]*(?:\|([^\[\]]*))?\S\]\]/g, '<a>$1</a>')
      .replace(/^\s{0,3}>\s?/g, '')
      .replace(/(^|\n)\s{0,3}>\s?/g, '\n\n')
      .replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, '')
@@ -152,7 +153,7 @@
  const redir = (id, term) => {
    // SPA navigation
    window.navigate(
    window.Million.navigate(
      new URL(
        `${BASE_URL.replace(/\/$/g, "")}${id}#:~:text=${encodeURIComponent(term)}/`
      ),