diff options
| author | Hysterelius | 2024-07-21 01:33:32 +1000 |
|---|---|---|
| committer | GitHub | 2024-07-20 08:33:32 -0700 |
| commit | a7244a2983538f373c0af2ecfa4d6377584b8063 (patch) | |
| tree | bc06b67d37ca88a5bbe938353f639cd28bef4d8d /static/js/search.js | |
| parent | 4dab5b9538f76cd56f53e6a68f34f505234e30ed (diff) | |
| download | abridge-a7244a2983538f373c0af2ecfa4d6377584b8063.tar.gz abridge-a7244a2983538f373c0af2ecfa4d6377584b8063.tar.bz2 abridge-a7244a2983538f373c0af2ecfa4d6377584b8063.zip | |
Add pagefind search to abridge (#179)
* Start process of adding pagefind to abridge
* Write to static to make index appear in public
* Add multilingual support
* Minify files and fix running in script
* Add pagefind files
* Add loading of pagefind data
* Update gitignore to remove pagefind index files
* Get basic search result surfacing working
* Remove duplicate entries in search results
* Sanitise except to remove unnecessary details
* Finalise addition of pagefind
* Add missing await
* Fix config.toml and remove old files on rebuild
* Finish chores on pagefind addition
Diffstat (limited to 'static/js/search.js')
| -rw-r--r-- | static/js/search.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/static/js/search.js b/static/js/search.js index 30cc278..caf5817 100644 --- a/static/js/search.js +++ b/static/js/search.js @@ -344,10 +344,10 @@ window.onload = function() { // Check the string is ascii characters or not var re = /^[\x00-\xff]+$/ if (word[1] !== TERM_WEIGHT && word[0].length >= 12 && !re.test(word[0])) { - // If the string's length is too long, it maybe a Chinese/Japance/Korean article + // If the string's length is too long, it maybe a Chinese/Japanese/Korean article // if using substring method directly, it may occur error codes on emoji chars - var strBefor = body.substring(word[2], startIndex); - var strAfter = substringByByte(strBefor, 12); + var strBefore = body.substring(word[2], startIndex); + var strAfter = substringByByte(strBefore, 12); teaser.push(strAfter); } else { teaser.push(body.substring(word[2], startIndex)); |
