From 7e4363e6be0b069855f2d0ab40f2ce25c68cbb7e Mon Sep 17 00:00:00 2001 From: Maboroshy Date: Mon, 5 Feb 2018 22:04:29 +0300 Subject: [PATCH] tags with spaces conersion fix --- in-note-text-tagging/in-note-text-tagging.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/in-note-text-tagging/in-note-text-tagging.qml b/in-note-text-tagging/in-note-text-tagging.qml index c2b396d..9e3629b 100644 --- a/in-note-text-tagging/in-note-text-tagging.qml +++ b/in-note-text-tagging/in-note-text-tagging.qml @@ -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; } }