Eliminar caracteres especiales de Lunr

https://lunrjs.com/guides/searching.html
This commit is contained in:
f 2021-09-18 17:00:46 -03:00
parent 7550f6ee9b
commit 4840d59e16

View file

@ -12,7 +12,7 @@ export default class extends Controller {
if (!this.hasQTarget) return if (!this.hasQTarget) return
if (!this.qTarget.value.trim().length === 0) return if (!this.qTarget.value.trim().length === 0) return
return this.qTarget.value.trim().replaceAll(/[^a-z0-9 ]/gi, '') return this.qTarget.value.trim().replaceAll(/[:~\*\^\+\-]/gi, '')
} }
connect () { connect () {