From 9acb03e669e20180b9bc95ca02b21460761fef87 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 3 Jul 2016 03:25:12 +0200 Subject: template-parser: renderer: implemented 'else' support in templates yeah, this is stupid. after more than 320 commits and 26 releases, we finally support the 'else' statement in the template engine. I don't know if I'm dumb or what, but it took me that long to find a "simple" solution to this basic issue. yep, no more `{% ifdef FOO %}...{% endif %}{% ifndef FOO %}...{% endif %}` blocks. but seriously, who cares?! :/ --- src/template-parser.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/template-parser.h') diff --git a/src/template-parser.h b/src/template-parser.h index 46223ec..fe2721e 100644 --- a/src/template-parser.h +++ b/src/template-parser.h @@ -21,6 +21,7 @@ typedef enum { BLOGC_TEMPLATE_IFDEF_STMT = 1, BLOGC_TEMPLATE_IFNDEF_STMT, BLOGC_TEMPLATE_IF_STMT, + BLOGC_TEMPLATE_ELSE_STMT, BLOGC_TEMPLATE_ENDIF_STMT, BLOGC_TEMPLATE_FOREACH_STMT, BLOGC_TEMPLATE_ENDFOREACH_STMT, -- cgit v1.2.3-18-g5258