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
1 changed files with 7 additions and 1 deletions

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;
}
}