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:
parent
0dd8cf892a
commit
7e4363e6be
1 changed files with 7 additions and 1 deletions
|
@ -166,9 +166,15 @@ Script {
|
||||||
if (!word.startsWith(tagMarker)) {
|
if (!word.startsWith(tagMarker)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// cut the tag marker off of the string and do a substring search for tags
|
// cut the tag marker off of the string and do a substring search for tags
|
||||||
var tags = script.searchTagsByName(word.substr(tagMarker.length));
|
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;
|
return tags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue