1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-12-22 07:58:08 +00:00

added a name replacement

This commit is contained in:
Patrizio Bekerle 2018-01-31 16:49:04 +01:00
parent efea2f35f3
commit f247d6857c
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
"identifier": "selected-markdown-to-jira",
"script": "selected-markdown-to-jira.qml",
"authors": ["@pbek"],
"version": "0.0.4",
"version": "0.0.5",
"minAppVersion": "17.05.7",
"description" : "With this script you can right click the selected text and convert it to <a href='https://www.atlassian.com/software/jira'>Jira</a> Code in the clipboard.\n\n<b>Dependencies</b>\n<a href=\"https://nodejs.org/en/download/\">Node.js</a>\n<a href=\"https://github.com/kylefarris/J2M\">jira2md</a> (installed via <code>npm</code>)\n\n<b>Installation</b>\nAfter you have installed <i>Node.js</i> you can install <i>jira2md</i> by typing:\n<code>sudo npm install -g jira2md</code>\n\nYou might also need to set your <code>NODE_PATH</code> to the path where the module did get installed with for example:\n<code>export NODE_PATH=/usr/local/lib/node_modules</code>"
}

View file

@ -55,7 +55,7 @@ QtObject {
var result = script.startSynchronousProcess(nodejsExecutablePath, params, text);
// replace some names
result = String(result).replace(/\@Georg/ig, "[~g.franz]").replace(/\@Jacob/ig, "[~j.ester]").replace(/\@Gandalf/ig, "[~g.sievers]").replace(/\@Dominik/ig, "[~d.jansen]").replace(/\@Adrian/ig, "[~a.lawley]");
result = String(result).replace(/\@Georg/ig, "[~g.franz]").replace(/\@Jacob/ig, "[~j.ester]").replace(/\@Gandalf/ig, "[~g.sievers]").replace(/\@Dominik/ig, "[~d.jansen]").replace(/\@Adrian/ig, "[~a.lawley]").replace(/\@Bastian/ig, "[~b.widensky]");
// put the result into the clipboard
script.setClipboardText(result);