Regexes
- Added regex support to substirutions. - Fixed bug that prevented 1.9.4 from shipping with regexes. If the description is "aXXaaXXa", and the substitution is /XX/.../ then the first substitutions changes the length of the string to "a...aaXXa" and therefore invalidates the index for the second match, and makes this change: "a...a...Xa". The fix is to keep a running 'skew' count of the difference in 'from' and 'to' length, to adjust the match indexes. - Moved the helper deltaSubstitutions function into the Task object, which makes more sense. - Cleaned up output composition for CmdAdd. - Eliminated #ifdef FEATURE_REGEX. They are here to stay.
This commit is contained in:
@@ -234,6 +234,7 @@
|
||||
#define STRING_TAGS_NO_COMMAS "Tags are not permitted to contain commas."
|
||||
#define STRING_TRIVIAL_INPUT "You must specify a command, or a task ID to modify."
|
||||
#define STRING_ASSUME_INFO "No command - assuming 'info'"
|
||||
#define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection."
|
||||
|
||||
// Feedback
|
||||
#define STRING_FEEDBACK_NO_MATCH "No matches."
|
||||
|
||||
Reference in New Issue
Block a user