aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc/content-parser.h
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-14 23:51:36 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-14 23:51:36 +0100
commit80017f034146b50fdc441c96636f1098adf7037e (patch)
treecbac45bca69cf635c2ad633ea1bcd6f40ba97a9f /src/blogc/content-parser.h
parent99ef1c93f0359741fd18217cd81cf2c3e0beaf7b (diff)
downloadblogc-80017f034146b50fdc441c96636f1098adf7037e.tar.gz
blogc-80017f034146b50fdc441c96636f1098adf7037e.tar.bz2
blogc-80017f034146b50fdc441c96636f1098adf7037e.zip
content-parser: source-parser: extract TITLE from content header
this patch implements support to using the first header found in source file as the TITLE variable. please note that if the TITLE variable is defined on the source file's variable section it takes precedence. this patch changes the old behaviour and can break some users' websites. if you have some '{% ifdef TITLE %}' blocks in your template, they will evaluate to true if you don't defined TITLE manually, but have a header in your content.
Diffstat (limited to 'src/blogc/content-parser.h')
-rw-r--r--src/blogc/content-parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blogc/content-parser.h b/src/blogc/content-parser.h
index 37e38d7..39230c6 100644
--- a/src/blogc/content-parser.h
+++ b/src/blogc/content-parser.h
@@ -17,7 +17,7 @@ char* blogc_htmlentities(const char *str);
char* blogc_fix_description(const char *paragraph);
char* blogc_content_parse_inline(const char *src);
bool blogc_is_ordered_list_item(const char *str, size_t prefix_len);
-char* blogc_content_parse(const char *src, size_t *end_excerpt,
+char* blogc_content_parse(const char *src, size_t *end_excerpt, char **title,
char **description);
#endif /* _CONTENT_PARSER_H */