fix: skip quick add magic parsing when text is wrapped in quotes
Closes go-vikunja/vikunja#2392
This commit is contained in:
parent
8538b4c885
commit
07b9742d98
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue