From 4840d59e163b263a721f475f836514c4eed83ecf Mon Sep 17 00:00:00 2001 From: f Date: Sat, 18 Sep 2021 17:00:46 -0300 Subject: [PATCH] Eliminar caracteres especiales de Lunr https://lunrjs.com/guides/searching.html --- _packs/controllers/search_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_packs/controllers/search_controller.js b/_packs/controllers/search_controller.js index eae213c..af861f2 100644 --- a/_packs/controllers/search_controller.js +++ b/_packs/controllers/search_controller.js @@ -12,7 +12,7 @@ export default class extends Controller { if (!this.hasQTarget) 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 () {