@@ -30,7 +30,7 @@ export interface DefaultTaskSerializerSymbols {
30
30
readonly cancelledDateSymbol : string ;
31
31
readonly recurrenceSymbol : string ;
32
32
readonly idSymbol : string ;
33
- readonly blockedBySymbol : string ;
33
+ readonly dependsOnSymbol : string ;
34
34
readonly TaskFormatRegularExpressions : {
35
35
priorityRegex : RegExp ;
36
36
startDateRegex : RegExp ;
@@ -41,7 +41,7 @@ export interface DefaultTaskSerializerSymbols {
41
41
cancelledDateRegex : RegExp ;
42
42
recurrenceRegex : RegExp ;
43
43
idRegex : RegExp ;
44
- blockedByRegex : RegExp ;
44
+ dependsOnRegex : RegExp ;
45
45
} ;
46
46
}
47
47
@@ -66,7 +66,7 @@ export const DEFAULT_SYMBOLS: DefaultTaskSerializerSymbols = {
66
66
doneDateSymbol : '✅' ,
67
67
cancelledDateSymbol : '❌' ,
68
68
recurrenceSymbol : '🔁' ,
69
- blockedBySymbol : '⛔️' ,
69
+ dependsOnSymbol : '⛔️' ,
70
70
idSymbol : '🆔' ,
71
71
TaskFormatRegularExpressions : {
72
72
// The following regex's end with `$` because they will be matched and
@@ -79,7 +79,7 @@ export const DEFAULT_SYMBOLS: DefaultTaskSerializerSymbols = {
79
79
doneDateRegex : / ✅ * ( \d { 4 } - \d { 2 } - \d { 2 } ) $ / u,
80
80
cancelledDateRegex : / ❌ * ( \d { 4 } - \d { 2 } - \d { 2 } ) $ / u,
81
81
recurrenceRegex : / 🔁 ? ( [ a - z A - Z 0 - 9 , ! ] + ) $ / iu,
82
- blockedByRegex : / ⛔ ️ * ( [ a - z 0 - 9 ] + ( * , * [ a - z 0 - 9 ] + * ) * ) $ / iu,
82
+ dependsOnRegex : / ⛔ ️ * ( [ a - z 0 - 9 ] + ( * , * [ a - z 0 - 9 ] + * ) * ) $ / iu,
83
83
idRegex : / 🆔 * ( [ a - z 0 - 9 ] + ) $ / iu,
84
84
} ,
85
85
} as const ;
@@ -130,7 +130,7 @@ export class DefaultTaskSerializer implements TaskSerializer {
130
130
cancelledDateSymbol,
131
131
recurrenceSymbol,
132
132
dueDateSymbol,
133
- blockedBySymbol ,
133
+ dependsOnSymbol ,
134
134
idSymbol,
135
135
} = this . symbols ;
136
136
@@ -172,7 +172,7 @@ export class DefaultTaskSerializer implements TaskSerializer {
172
172
return symbolAndStringValue ( shortMode , recurrenceSymbol , task . recurrence . toText ( ) ) ;
173
173
case TaskLayoutComponent . BlockedBy : {
174
174
if ( task . blockedBy . length === 0 ) return '' ;
175
- return symbolAndStringValue ( shortMode , blockedBySymbol , task . blockedBy . join ( ',' ) ) ;
175
+ return symbolAndStringValue ( shortMode , dependsOnSymbol , task . blockedBy . join ( ',' ) ) ;
176
176
}
177
177
case TaskLayoutComponent . Id :
178
178
return symbolAndStringValue ( shortMode , idSymbol , task . id ) ;
@@ -233,7 +233,7 @@ export class DefaultTaskSerializer implements TaskSerializer {
233
233
let recurrenceRule : string = '' ;
234
234
let recurrence : Recurrence | null = null ;
235
235
let id : string = '' ;
236
- let blockedBy : string [ ] | [ ] = [ ] ;
236
+ let dependsOn : string [ ] | [ ] = [ ] ;
237
237
// Tags that are removed from the end while parsing, but we want to add them back for being part of the description.
238
238
// In the original task description they are possibly mixed with other components
239
239
// (e.g. #tag1 <due date> #tag2), they do not have to all trail all task components,
@@ -323,11 +323,11 @@ export class DefaultTaskSerializer implements TaskSerializer {
323
323
matched = true ;
324
324
}
325
325
326
- const blockedByMatch = line . match ( TaskFormatRegularExpressions . blockedByRegex ) ;
326
+ const dependsOnMatch = line . match ( TaskFormatRegularExpressions . dependsOnRegex ) ;
327
327
328
- if ( blockedByMatch != null ) {
329
- line = line . replace ( TaskFormatRegularExpressions . blockedByRegex , '' ) . trim ( ) ;
330
- blockedBy = blockedByMatch [ 1 ]
328
+ if ( dependsOnMatch != null ) {
329
+ line = line . replace ( TaskFormatRegularExpressions . dependsOnRegex , '' ) . trim ( ) ;
330
+ dependsOn = dependsOnMatch [ 1 ]
331
331
. replace ( ' ' , '' )
332
332
. split ( ',' )
333
333
. filter ( ( item ) => item !== '' ) ;
@@ -364,7 +364,7 @@ export class DefaultTaskSerializer implements TaskSerializer {
364
364
cancelledDate,
365
365
recurrence,
366
366
id,
367
- blockedBy,
367
+ blockedBy : dependsOn ,
368
368
tags : Task . extractHashtags ( line ) ,
369
369
} ;
370
370
}
0 commit comments