srctree

Gregory Mullen parent 7297fcc3 e00e9e0d
remove support for legacy _template.html syntax

inlinesplit
examples/templates/example.html added: 4, removed: 11, total 0
@@ -72,7 +72,6 @@
<!-- template. -->
<Build EmptyVars templates/_include_empty.html />
<!-- n.b. some of this behavior is subject to change. -->
<!-- TODO add and document _template_name.html syntax (or remove syntax) -->
</content>
</body>
</html>
 
src/template/directive.zig added: 4, removed: 11, total 0
@@ -57,14 +57,8 @@ pub fn init(str: []const u8) ?Directive {
 
fn initNoun(noun: []const u8, tag: []const u8) ?Directive {
//std.debug.print("init noun {s}\n", .{noun});
if (noun[0] == '_') if (getBuiltin(noun)) |bi| {
return Directive{
.noun = noun,
.verb = .variable,
.otherwise = .{ .template = bi },
.tag_block = tag,
};
};
 
if (noun[0] == '_') @panic("Template Directives must not start with _");
 
var default_str: ?[]const u8 = null;
var knownt: ?KnownType = null;