diff --git a/angel_jael/lib/angel_jael.dart b/angel_jael/lib/angel_jael.dart index 1484d568..410fd324 100644 --- a/angel_jael/lib/angel_jael.dart +++ b/angel_jael/lib/angel_jael.dart @@ -13,7 +13,11 @@ import 'package:symbol_table/symbol_table.dart'; /// /// To apply additional transforms to parsed documents, provide a set of [patch] functions. AngelConfigurer jael(Directory viewsDirectory, - {String fileExtension, bool cacheViews: false, Iterable patch, CodeBuffer createBuffer()}) { + {String fileExtension, + bool strictResolution: false, + bool cacheViews: false, + Iterable patch, + CodeBuffer createBuffer()}) { var cache = {}; fileExtension ??= '.jl'; createBuffer ??= () => new CodeBuffer(); @@ -29,11 +33,12 @@ AngelConfigurer jael(Directory viewsDirectory, var file = viewsDirectory.childFile(name + fileExtension); var contents = await file.readAsString(); var doc = - parseDocument(contents, sourceUrl: file.uri, onError: errors.add); + parseDocument(contents, sourceUrl: file.uri, onError: errors.add); processed = doc; try { - processed = await resolve(doc, viewsDirectory, patch: patch, onError: errors.add); + processed = await resolve(doc, viewsDirectory, + patch: patch, onError: errors.add); } catch (_) { // Ignore these errors, so that we can show syntax errors. } @@ -48,7 +53,8 @@ AngelConfigurer jael(Directory viewsDirectory, if (errors.isEmpty) { try { - const Renderer().render(processed, buf, scope); + const Renderer().render(processed, buf, scope, + strictResolution: strictResolution == true); return buf.toString(); } on JaelError catch (e) { errors.add(e); diff --git a/angel_jael/pubspec.yaml b/angel_jael/pubspec.yaml index 3a24dec4..dba03b78 100644 --- a/angel_jael/pubspec.yaml +++ b/angel_jael/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_jael -version: 1.0.0-alpha+1 +version: 1.0.0-alpha+2 description: Angel support for the Jael templating engine. author: Tobe O homepage: https://github.com/angel-dart/jael/tree/master/jael