mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 22:33:42 -04:00
Fixed search stuck in initializing when tags are used
This commit is contained in:
@@ -206,7 +206,10 @@ export class Search {
|
||||
this.field("text")
|
||||
this.field("tags", { boost: 1e6, extractor: doc => {
|
||||
const { tags = [] } = doc as SearchDocument
|
||||
return tags.flatMap(tag => lunr.tokenizer(tag))
|
||||
return tags.reduce((list, tag) => [
|
||||
...list,
|
||||
...lunr.tokenizer(tag)
|
||||
], [] as lunr.Token[])
|
||||
} })
|
||||
|
||||
/* Index documents */
|
||||
|
||||
Reference in New Issue
Block a user