leo-buneev / vuepress-plugin-fulltext-search

Adds full-text search capabilities to your vuepress site with a help of flexsearch library.
MIT License
93 stars 23 forks source link

[Bug] can't search for numbers first #17

Closed leppkjs closed 3 years ago

leppkjs commented 3 years ago

If you enter numbers first, can't search I think the cause is due to regular expressions.

queryTerms() {
      if (!this.query) return []
      const result = this.query
        .trim()
        .toLowerCase()
        .split(/[^\p{L}]+/iu)
        .filter(t => t)
      return result
    },

How about changing it like this? [^\p{L}] -> [^\p{L}\p{N}_]

leo-buneev commented 3 years ago

Resolved in #17 Published in 2.0.6