From 7550f6ee9b6bdb4bae9bce0d1e5d564306059d56 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 9 Jul 2021 18:46:31 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Solo=20hacer=20b=C3=BAsquedas=20de=20texto?= =?UTF-8?q?=20plano?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes sutty/sutty#889 fixes sutty/sutty#899 fixes sutty/sutty#1475 fixes sutty/sutty#1476 fixes sutty/sutty#1937 fixes sutty/sutty#2044 fixes sutty/sutty#2107 fixes sutty/sutty#2164 fixes sutty/sutty#2193 --- _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 59305a5..eae213c 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().replace(':', '') + return this.qTarget.value.trim().replaceAll(/[^a-z0-9 ]/gi, '') } connect () { From 4840d59e163b263a721f475f836514c4eed83ecf Mon Sep 17 00:00:00 2001 From: f Date: Sat, 18 Sep 2021 17:00:46 -0300 Subject: [PATCH 2/2] 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 () {