From 10ac1ff66a2bcd797f54c83dda13745fdf359f33 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 12 Apr 2023 09:46:48 +0200 Subject: [PATCH] chore: use startsWith for prefix matching --- src/modules/parseTaskText.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/parseTaskText.ts b/src/modules/parseTaskText.ts index 3e6dedf83..0b4044d1c 100644 --- a/src/modules/parseTaskText.ts +++ b/src/modules/parseTaskText.ts @@ -109,7 +109,7 @@ const getItemsFromPrefix = (text: string, prefix: string): string[] => { return } - if (p.substring(0, 1) === prefix) { + if (p.startsWith(prefix)) { p = p.substring(1) }