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

tags with spaces conersion fix

This commit is contained in:
Maboroshy 2018-02-05 22:04:29 +03:00 committed by GitHub
parent 0dd8cf892a
commit 7e4363e6be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -166,9 +166,15 @@ Script {
if (!word.startsWith(tagMarker)) {
return [];
}
// cut the tag marker off of the string and do a substring search for tags
var tags = script.searchTagsByName(word.substr(tagMarker.length));
// convert tag names with spaces to in-text tags with "_", "tag one" to @tag_one
for (var i = 0; i < tags.length; i++) {
tags[i] = tags[i].replace(" ", "_");
}
return tags;
}
}