From 80017f034146b50fdc441c96636f1098adf7037e Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 14 Feb 2017 23:51:36 +0100 Subject: 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. --- src/blogc/content-parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blogc/content-parser.h') 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 */ -- cgit v1.2.3-18-g5258