Allow strict resolution

This commit is contained in:
Tobe O 2018-04-03 11:32:19 -04:00
parent f8fd0e0a0a
commit bd2f7bd0df

View file

@ -49,11 +49,24 @@ class JaelBuilder implements Builder {
if (errors.isNotEmpty) { if (errors.isNotEmpty) {
jael.Renderer.errorDocument(errors, buf); jael.Renderer.errorDocument(errors, buf);
return; } else {
} var scope = new SymbolTable(values: new Map.from(options.config));
var scope = new SymbolTable(values: new Map.from(options.config)); try {
const jael.Renderer().render(doc, buf, scope); const jael.Renderer().render(
doc,
buf,
scope,
strictResolution: options.config['strict'] == true,
);
} on jael.JaelError catch (e) {
errors.add(e);
}
if (errors.isNotEmpty) {
jael.Renderer.errorDocument(errors, buf);
}
}
buildStep.writeAsString( buildStep.writeAsString(
buildStep.inputId.changeExtension('.html'), buildStep.inputId.changeExtension('.html'),