@@ -66,16 +66,16 @@ describe('validate emoji regular expressions', () => {
6666 expect ( generateRegexApprovalTest ( ) ) . toMatchInlineSnapshot ( `
6767 "
6868 priorityRegex: /([🔺⏫🔼🔽⏬])\\ufe0f?$/u
69- startDateRegex: /🛫 *(\\d{4}-\\d{2}-\\d{2})$/u
70- createdDateRegex: /➕ *(\\d{4}-\\d{2}-\\d{2})$/u
71- scheduledDateRegex: /[⏳⌛] *(\\d{4}-\\d{2}-\\d{2})$/u
72- dueDateRegex: /[📅📆🗓] *(\\d{4}-\\d{2}-\\d{2})$/u
73- doneDateRegex: /✅ *(\\d{4}-\\d{2}-\\d{2})$/u
74- cancelledDateRegex: /❌ *(\\d{4}-\\d{2}-\\d{2})$/u
75- recurrenceRegex: /🔁 *([a-zA-Z0-9, !]+)$/u
76- onCompletionRegex: /🏁 *([a-zA-Z]+)$/u
69+ startDateRegex: /🛫\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
70+ createdDateRegex: /➕\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
71+ scheduledDateRegex: /[⏳⌛]\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
72+ dueDateRegex: /[📅📆🗓]\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
73+ doneDateRegex: /✅\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
74+ cancelledDateRegex: /❌\\ufe0f? *(\\d{4}-\\d{2}-\\d{2})$/u
75+ recurrenceRegex: /🔁\\ufe0f? *([a-zA-Z0-9, !]+)$/u
76+ onCompletionRegex: /🏁\\ufe0f? *([a-zA-Z]+)$/u
7777 dependsOnRegex: /⛔\\ufe0f? *([a-zA-Z0-9-_]+( *, *[a-zA-Z0-9-_]+ *)*)$/u
78- idRegex: /🆔 *([a-zA-Z0-9-_]+)$/u
78+ idRegex: /🆔\\ufe0f? *([a-zA-Z0-9-_]+)$/u
7979 "
8080 ` ) ;
8181 } ) ;
@@ -122,6 +122,15 @@ describe.each(symbolMap)("DefaultTaskSerializer with '$taskFormat' symbols", ({
122122 expect ( taskDetails ) . toMatchTaskDetails ( { [ 'scheduledDate' ] : moment ( '2021-06-20' , 'YYYY-MM-DD' ) } ) ;
123123 } ) ;
124124
125+ it ( 'should parse a scheduledDate - with Variation Selector' , ( ) => {
126+ // This test showed the existence of https://github.com/obsidian-tasks-group/obsidian-tasks/issues/3179
127+ const input = '⏳️ 2024-11-18' ;
128+ expect ( hasVariantSelector16 ( input ) ) . toBe ( true ) ;
129+
130+ const taskDetails = deserialize ( input ) ;
131+ expect ( taskDetails ) . toMatchTaskDetails ( { [ 'scheduledDate' ] : moment ( '2024-11-18' , 'YYYY-MM-DD' ) } ) ;
132+ } ) ;
133+
125134 it ( 'should parse a dueDate - with non-standard emoji 1' , ( ) => {
126135 const taskDetails = deserialize ( '📆 2021-06-20' ) ;
127136 expect ( taskDetails ) . toMatchTaskDetails ( { [ 'dueDate' ] : moment ( '2021-06-20' , 'YYYY-MM-DD' ) } ) ;
0 commit comments