aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-30 22:45:46 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-01-30 22:45:46 +0100
commitc4d19f731dc683c5a65327d99f2b416d4781f00b (patch)
tree09e8941c5ac840b2a74ca28e5a474b7746e5fe79 /src/loader.c
parent008c96d6518125f2683c1b4e842ca3ed6e865c3d (diff)
parent3b0ea0a4908f1702308354ec7cbd8db5c80f87ee (diff)
downloadblogc-c4d19f731dc683c5a65327d99f2b416d4781f00b.tar.gz
blogc-c4d19f731dc683c5a65327d99f2b416d4781f00b.tar.bz2
blogc-c4d19f731dc683c5a65327d99f2b416d4781f00b.zip
Merge remote-tracking branch 'origin/master' into feature/directives
Diffstat (limited to 'src/loader.c')
-rw-r--r--src/loader.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/loader.c b/src/loader.c
index 8f04dae..baa81fa 100644
--- a/src/loader.c
+++ b/src/loader.c
@@ -1,6 +1,6 @@
/*
* blogc: A blog compiler.
- * Copyright (C) 2015 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+ * Copyright (C) 2015-2016 Rafael G. Martins <rafael@rafaelmartins.eng.br>
*
* This program can be distributed under the terms of the BSD License.
* See the file LICENSE.
@@ -141,11 +141,14 @@ blogc_source_parse_from_files(b_trie_t *conf, b_slist_t *l, blogc_error_t **err)
b_trie_free(s);
continue;
}
- char **tags = b_str_split(tags_str, ',', 0);
+ char **tags = b_str_split(tags_str, ' ', 0);
bool found = false;
- for (unsigned int i = 0; tags[i] != NULL; i++)
- if (0 == strcmp(b_str_strip(tags[i]), filter_tag))
+ for (unsigned int i = 0; tags[i] != NULL; i++) {
+ if (tags[i][0] == '\0')
+ continue;
+ if (0 == strcmp(tags[i], filter_tag))
found = true;
+ }
b_strv_free(tags);
if (!found) {
b_trie_free(s);