diff --git a/angel_jael/CHANGELOG.md b/angel_jael/CHANGELOG.md index 814428b9..c61d0c8a 100644 --- a/angel_jael/CHANGELOG.md +++ b/angel_jael/CHANGELOG.md @@ -1,2 +1,6 @@ +# 1.0.2 +* Update for DSX support. +* Clear the buffer on errors. + # 1.0.1 * Use `Renderer.errorDocument`. \ No newline at end of file diff --git a/angel_jael/lib/angel_jael.dart b/angel_jael/lib/angel_jael.dart index 421e6746..dc7d9c8d 100644 --- a/angel_jael/lib/angel_jael.dart +++ b/angel_jael/lib/angel_jael.dart @@ -17,6 +17,7 @@ AngelConfigurer jael(Directory viewsDirectory, bool strictResolution: false, bool cacheViews: false, Iterable patch, + bool asDSX: false, CodeBuffer createBuffer()}) { var cache = {}; fileExtension ??= '.jl'; @@ -32,8 +33,8 @@ AngelConfigurer jael(Directory viewsDirectory, } else { var file = viewsDirectory.childFile(name + fileExtension); var contents = await file.readAsString(); - var doc = - parseDocument(contents, sourceUrl: file.uri, onError: errors.add); + var doc = parseDocument(contents, + sourceUrl: file.uri, asDSX: asDSX == true, onError: errors.add); processed = doc; try { @@ -61,7 +62,7 @@ AngelConfigurer jael(Directory viewsDirectory, } } - Renderer.errorDocument(errors, buf); + Renderer.errorDocument(errors, buf..clear()); return buf.toString(); }; }; diff --git a/angel_jael/pubspec.yaml b/angel_jael/pubspec.yaml index ad0ff432..35d5fae2 100644 --- a/angel_jael/pubspec.yaml +++ b/angel_jael/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_jael -version: 1.0.1 +version: 1.0.2 description: Angel support for the Jael templating engine. author: Tobe O homepage: https://github.com/angel-dart/jael/tree/master/jael diff --git a/jael.iml b/jael.iml index 449f16ce..43d56f10 100644 --- a/jael.iml +++ b/jael.iml @@ -3,6 +3,7 @@ +