From fa4f8221d5a1c0061cfbdfcea7d7472555df7129 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 31 Jan 2022 13:37:25 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Made=20/-menu=20card=20searching?= =?UTF-8?q?=20case-insensitive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - allows typing "Button" to match the "button" card - useful on mobile where words can be auto-capitalized --- .../lib/koenig-editor/addon/components/koenig-slash-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js index 72618a5340..985af09de6 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js @@ -24,7 +24,7 @@ const createItemMatcher = (query) => { // standard exact matching for items with a matches array if (isArray(item.matches)) { - return card ? item.matches.any(match => match.indexOf(card) === 0) : true; + return card ? item.matches.any(match => match.indexOf(card.toLowerCase()) === 0) : true; } // custom per-item matching, eg. snippets match any part of their title