mirror of
https://github.com/marty-oehme/scripts.git
synced 2024-12-21 15:38:09 +00:00
Fixed bug preveting from importing a task that has no tag.
This commit is contained in:
parent
8362f1e9fc
commit
d091ee9f0b
1 changed files with 14 additions and 15 deletions
|
@ -302,22 +302,21 @@ QtObject {
|
|||
tagsSeparated.splice(0, 1); // removing ""
|
||||
if (tagsSeparated.length === 0) {
|
||||
logIfVerbose("No tags");
|
||||
return;
|
||||
} else {
|
||||
tagsSeparated.splice(0, 1); // removing headline
|
||||
tagsSeparated.splice(0, 1); // removing "----"
|
||||
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
|
||||
tagsSeparated.forEach( function(tag){
|
||||
|
||||
var tagsRegexp = /[\s*]?(.+)[\s*]?1[\s*]?/i;
|
||||
var fetchTag = tagsRegexp.exec(tag);
|
||||
tagsPlainText += " +" + fetchTag[1].replace(/ /g,'');
|
||||
});
|
||||
}
|
||||
|
||||
tagsSeparated.splice(0, 1); // removing headline
|
||||
tagsSeparated.splice(0, 1); // removing "----"
|
||||
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||
|
||||
tagsSeparated.forEach( function(tag){
|
||||
|
||||
var tagsRegexp = /[\s*]?(.+)[\s*]?1[\s*]?/i;
|
||||
var fetchTag = tagsRegexp.exec(tag);
|
||||
tagsPlainText += " +" + fetchTag[1].replace(/ /g,'');
|
||||
});
|
||||
}
|
||||
|
||||
var taskEntry = "* " + fetchTaskParams[2] + tagsPlainText;
|
||||
|
|
Loading…
Reference in a new issue