aboutsummaryrefslogtreecommitdiffstats
path: root/src/source-parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-07 22:35:18 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-07 22:35:18 -0300
commitb24efa3885637d953892ccf718662aa693eaa879 (patch)
tree76e5f074021f59194535a79ea348f711c8db68cd /src/source-parser.c
parent28b02d920aa9347f25bc28f5989919174d9f60a9 (diff)
downloadblogc-b24efa3885637d953892ccf718662aa693eaa879.tar.gz
blogc-b24efa3885637d953892ccf718662aa693eaa879.tar.bz2
blogc-b24efa3885637d953892ccf718662aa693eaa879.zip
content-parser: more random stuff
Diffstat (limited to 'src/source-parser.c')
-rw-r--r--src/source-parser.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/source-parser.c b/src/source-parser.c
index 60b5fe5..13741bd 100644
--- a/src/source-parser.c
+++ b/src/source-parser.c
@@ -14,6 +14,7 @@
#include <string.h>
#include "utils/utils.h"
+#include "content-parser.h"
#include "source-parser.h"
#include "error.h"
@@ -125,10 +126,12 @@ blogc_source_parse(const char *src, size_t src_len, blogc_error_t **err)
state = SOURCE_CONTENT;
break;
- case SOURCE_CONTENT:
- if (current == (src_len - 1))
- b_trie_insert(rv, "CONTENT",
- b_strndup(src + start, src_len - start));
+ case SOURCE_CONTENT:
+ if (current == (src_len - 1)) {
+ tmp = b_strndup(src + start, src_len - start);
+ b_trie_insert(rv, "RAW_CONTENT", tmp);
+ b_trie_insert(rv, "CONTENT", blogc_content_parse(tmp));
+ }
break;
}