Now allowing spaces in tags

This commit is contained in:
Markus Koch 2017-02-04 19:57:02 +01:00
parent c628684c5b
commit 64e0d0ce02

View File

@ -191,7 +191,7 @@ static GList *mdiary_add_tags_from_string(gchar *string)
*/
ptr = beg_ptr = orig_ptr = g_strdup(g_match_info_fetch(match_info, 1));
do {
if (*ptr == ',' || *ptr == ' ' || *ptr == '\0') {
if (*ptr == ',' || *ptr == '\0') {
bak = *ptr;
if (collected) {
collected = 0;
@ -202,6 +202,9 @@ static GList *mdiary_add_tags_from_string(gchar *string)
} else {
beg_ptr = ptr + 1;
}
} else if (*ptr == ' ') {
if (!collected)
beg_ptr = ptr + 1;
} else {
collected = 1;
}