1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-23 23:21:00 +01:00

Fixed Vietnamese search not working due to Lunr.js error

This commit is contained in:
squidfunk 2024-09-17 16:00:26 +02:00
parent 7faa464e36
commit 8925cae63a
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
4 changed files with 9 additions and 6 deletions

View File

@ -218,7 +218,7 @@
"base": base_url,
"features": features,
"translations": {},
"search": "assets/javascripts/workers/search.07f07601.min.js" | url
"search": "assets/javascripts/workers/search.6ce7567c.min.js" | url
} -%}
{%- if config.extra.version -%}
{%- set mike = config.plugins.get("mike") -%}

View File

@ -186,6 +186,9 @@ export async function handler(
/* Expose Lunr.js in global scope, or stemmers won't work */
self.lunr = lunr
/* Monkey-patch Lunr.js to mitigate https://t.ly/68TLq */
lunr.utils.warn = console.warn
/* Handle messages */
addEventListener("message", async ev => {
postMessage(await handler(ev.data))