mirror of
https://github.com/marty-oehme/scripts.git
synced 2024-12-22 07:58:08 +00:00
Small code fixes.
This commit is contained in:
parent
8c2eac447b
commit
8362f1e9fc
1 changed files with 0 additions and 7 deletions
|
@ -299,7 +299,6 @@ QtObject {
|
||||||
var tagsSeparated;
|
var tagsSeparated;
|
||||||
// The result does not contain any \n, so we are splitting by whitespace.
|
// The result does not contain any \n, so we are splitting by whitespace.
|
||||||
tagsSeparated = tagResult.toString().split('\n');
|
tagsSeparated = tagResult.toString().split('\n');
|
||||||
logIfVerbose(tagsSeparated);
|
|
||||||
tagsSeparated.splice(0, 1); // removing ""
|
tagsSeparated.splice(0, 1); // removing ""
|
||||||
if (tagsSeparated.length === 0) {
|
if (tagsSeparated.length === 0) {
|
||||||
logIfVerbose("No tags");
|
logIfVerbose("No tags");
|
||||||
|
@ -313,14 +312,12 @@ QtObject {
|
||||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||||
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
tagsSeparated.splice(tagsSeparated.length - 1, 1); // removing ""
|
||||||
|
|
||||||
logIfVerbose(tagsSeparated);
|
|
||||||
tagsSeparated.forEach( function(tag){
|
tagsSeparated.forEach( function(tag){
|
||||||
|
|
||||||
var tagsRegexp = /[\s*]?(.+)[\s*]?1[\s*]?/i;
|
var tagsRegexp = /[\s*]?(.+)[\s*]?1[\s*]?/i;
|
||||||
var fetchTag = tagsRegexp.exec(tag);
|
var fetchTag = tagsRegexp.exec(tag);
|
||||||
tagsPlainText += " +" + fetchTag[1].replace(/ /g,'');
|
tagsPlainText += " +" + fetchTag[1].replace(/ /g,'');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var taskEntry = "* " + fetchTaskParams[2] + tagsPlainText;
|
var taskEntry = "* " + fetchTaskParams[2] + tagsPlainText;
|
||||||
|
@ -334,8 +331,6 @@ QtObject {
|
||||||
}
|
}
|
||||||
// We gather task IDs in case deleteOnImport is enabled.
|
// We gather task IDs in case deleteOnImport is enabled.
|
||||||
taskIds.push(fetchTaskParams[1]);
|
taskIds.push(fetchTaskParams[1]);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (deleteOnImport) {
|
if (deleteOnImport) {
|
||||||
|
@ -346,9 +341,7 @@ QtObject {
|
||||||
"delete"
|
"delete"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Finally, selected text is replaced by the text with insertions.
|
// Finally, selected text is replaced by the text with insertions.
|
||||||
|
|
Loading…
Reference in a new issue