Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Tagsuggestion functionality now splits the filename with space, comma, plus, underscore and score delimiters

uggrock03607971ba45
diff --git a/data/js/tagspace.api.js b/data/js/tagspace.api.js
index b8676d21d..ec258f653 100644
--- a/data/js/tagspace.api.js
+++ b/data/js/tagspace.api.js
@@ -89,9 +89,9 @@ TSAPI.suggestTags = function(fileName) {
} else {
tagContainer = fileName.slice(0,beginTagContainer).trim();
}
-
- // TODO also with _ - .
- tags = tagContainer.split(" ");
+
+ // Splitting filename with space, comma, plus, underscore and score delimiters
+ tags = tagContainer.split(/[\s,+_-]+/);
var cleanedTags = [];
for (var i=0; i < tags.length; i++) {