fix: skip quick add magic parsing when text is wrapped in quotes

Closes go-vikunja/vikunja#2392
This commit is contained in:
kolaente 2026-03-23 18:18:20 +01:00 committed by kolaente
parent 8538b4c885
commit 07b9742d98
1 changed files with 10 additions and 0 deletions

View File

@ -22,6 +22,16 @@ export const parseTaskText = (text: string, prefixesMode: PrefixMode = PrefixMod
repeats: null,
}
// If the entire text is wrapped in quotes, strip them and skip all parsing
if (
text.length >= 2
&& ((text.startsWith('"') && text.endsWith('"'))
|| (text.startsWith('\'') && text.endsWith('\'')))
) {
result.text = text.slice(1, -1)
return result
}
const prefixes = PREFIXES[prefixesMode]
if (prefixes === undefined) {
return result