@@ -71,7 +71,7 @@ describe('validate emoji regular expressions', () => {
7171 doneDateRegex: /✅ *(\\d{4}-\\d{2}-\\d{2})$/u
7272 cancelledDateRegex: /❌ *(\\d{4}-\\d{2}-\\d{2})$/u
7373 recurrenceRegex: /🔁 ?([a-zA-Z0-9, !]+)$/iu
74- onCompletionRegex: /🏁 ? ([a-zA-Z]+)$/iu
74+ onCompletionRegex: /🏁 * ([a-zA-Z]+)$/iu
7575 dependsOnRegex: /⛔️? *([a-zA-Z0-9-_]+( *, *[a-zA-Z0-9-_]+ *)*)$/iu
7676 idRegex: /🆔 *([a-zA-Z0-9-_]+)$/iu"
7777 ` ) ;
@@ -170,10 +170,16 @@ describe.each(symbolMap)("DefaultTaskSerializer with '$taskFormat' symbols", ({
170170
171171 describe ( 'should parse onCompletion' , ( ) => {
172172 it ( 'should parse delete action' , ( ) => {
173- const onCompletion = `${ onCompletionSymbol } delete ` ;
173+ const onCompletion = `${ onCompletionSymbol } Delete ` ;
174174 const taskDetails = deserialize ( onCompletion ) ;
175175 expect ( taskDetails ) . toMatchTaskDetails ( { onCompletion : OnCompletion . Delete } ) ;
176176 } ) ;
177+
178+ it ( 'should allow multiple spaces' , ( ) => {
179+ const onCompletion = `${ onCompletionSymbol } Keep` ;
180+ const taskDetails = deserialize ( onCompletion ) ;
181+ expect ( taskDetails ) . toMatchTaskDetails ( { onCompletion : OnCompletion . Keep } ) ;
182+ } ) ;
177183 } ) ;
178184
179185 describe ( 'should parse depends on' , ( ) => {
0 commit comments