fix travis

This commit is contained in:
Tobe O 2017-10-02 12:08:02 -04:00
parent 194b847171
commit 323e722675
2 changed files with 6 additions and 6 deletions

View file

@ -35,7 +35,7 @@ Future<Document> applyInheritance(Document document, Directory currentDirectory,
var element = document.root; var element = document.root;
var attr = element.attributes var attr = element.attributes
.firstWhere((a) => a.name.name == 'src', orElse: () => null); .firstWhere((a) => a.name == 'src', orElse: () => null);
if (attr == null) { if (attr == null) {
onError(new JaelError(JaelErrorSeverity.warning, onError(new JaelError(JaelErrorSeverity.warning,
'Missing "src" attribute in "extend" tag.', element.tagName.span)); 'Missing "src" attribute in "extend" tag.', element.tagName.span));
@ -91,7 +91,7 @@ Map<String, Element> extractBlockDeclarations(
for (Element blockElement in blockElements) { for (Element blockElement in blockElements) {
var nameAttr = blockElement.attributes var nameAttr = blockElement.attributes
.firstWhere((a) => a.name.name == 'name', orElse: () => null); .firstWhere((a) => a.name == 'name', orElse: () => null);
if (nameAttr == null) { if (nameAttr == null) {
onError(new JaelError(JaelErrorSeverity.warning, onError(new JaelError(JaelErrorSeverity.warning,
'Missing "name" attribute in "block" tag.', blockElement.span)); 'Missing "name" attribute in "block" tag.', blockElement.span));
@ -115,7 +115,7 @@ String getParent(Document document, void onError(JaelError error)) {
if (element.tagName.name != 'extend') return null; if (element.tagName.name != 'extend') return null;
var attr = element.attributes var attr = element.attributes
.firstWhere((a) => a.name.name == 'src', orElse: () => null); .firstWhere((a) => a.name == 'src', orElse: () => null);
if (attr == null) { if (attr == null) {
onError(new JaelError(JaelErrorSeverity.warning, onError(new JaelError(JaelErrorSeverity.warning,
'Missing "src" attribute in "extend" tag.', element.tagName.span)); 'Missing "src" attribute in "extend" tag.', element.tagName.span));
@ -150,7 +150,7 @@ Future<Element> expandBlocks(Element element, Map<String, Element> blocks,
expanded.add(child); expanded.add(child);
} else { } else {
var nameAttr = child.attributes var nameAttr = child.attributes
.firstWhere((a) => a.name.name == 'name', orElse: () => null); .firstWhere((a) => a.name == 'name', orElse: () => null);
if (nameAttr == null) { if (nameAttr == null) {
onError(new JaelError(JaelErrorSeverity.warning, onError(new JaelError(JaelErrorSeverity.warning,
'Missing "name" attribute in "block" tag.', child.span)); 'Missing "name" attribute in "block" tag.', child.span));
@ -243,7 +243,7 @@ Future<Element> _expandIncludes(Element element, Directory currentDirectory,
} }
var attr = element.attributes var attr = element.attributes
.firstWhere((a) => a.name.name == 'src', orElse: () => null); .firstWhere((a) => a.name == 'src', orElse: () => null);
if (attr == null) { if (attr == null) {
onError(new JaelError(JaelErrorSeverity.warning, onError(new JaelError(JaelErrorSeverity.warning,
'Missing "src" attribute in "include" tag.', element.tagName.span)); 'Missing "src" attribute in "include" tag.', element.tagName.span));

View file

@ -1,5 +1,5 @@
name: jael_preprocessor name: jael_preprocessor
version: 1.0.0-alpha+1 version: 1.0.0-alpha+2
description: A pre-processor for resolving blocks and includes within Jael templates. description: A pre-processor for resolving blocks and includes within Jael templates.
author: Tobe O <thosakwe@gmail.com> author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/jael/tree/master/jael_processor homepage: https://github.com/angel-dart/jael/tree/master/jael_processor