| Index: third_party/pkg/angular/lib/tools/html_extractor.dart
|
| diff --git a/third_party/pkg/angular/lib/tools/html_extractor.dart b/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| index 4dc637cb478eec4e0765932b4f30634e7597b4a7..ddeef0e075bfd38e624d342129d3ec05dc13326e 100644
|
| --- a/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| +++ b/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| @@ -13,7 +13,7 @@ RegExp _MUSTACHE_REGEXP = new RegExp(r'{{([^}]*)}}');
|
| RegExp _NG_REPEAT_SYNTAX = new RegExp(r'^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$');
|
|
|
| class HtmlExpressionExtractor {
|
| - List<DirectiveInfo> directiveInfos;
|
| + Iterable<DirectiveInfo> directiveInfos;
|
|
|
| HtmlExpressionExtractor(this.directiveInfos) {
|
| for (DirectiveInfo directiveInfo in directiveInfos) {
|
| @@ -44,7 +44,7 @@ class HtmlExpressionExtractor {
|
| });
|
| }
|
| if (matchesNode(node, r':contains(/{{.*}}/)')) {
|
| - _MUSTACHE_REGEXP.allMatches(node.value).forEach((match) {
|
| + _MUSTACHE_REGEXP.allMatches(node.text).forEach((match) {
|
| expressions.add(match.group(1));
|
| });
|
| }
|
| @@ -55,7 +55,8 @@ class HtmlExpressionExtractor {
|
| }
|
|
|
| for (DirectiveInfo directiveInfo in directiveInfos) {
|
| - if (matchesNode(node, directiveInfo.selector)) {
|
| + if (directiveInfo.selector != null &&
|
| + matchesNode(node, directiveInfo.selector)) {
|
| directiveInfo.expressionAttrs.forEach((attr) {
|
| if (node.attributes[attr] != null && attr != 'ng-repeat') {
|
| expressions.add(node.attributes[attr]);
|
| @@ -69,7 +70,7 @@ class HtmlExpressionExtractor {
|
| visitNodes(List<Node> nodes, NodeVisitor visitor) {
|
| for (Node node in nodes) {
|
| visitor(node);
|
| - if (node.nodes.length > 0) {
|
| + if (node.nodes.isNotEmpty) {
|
| visitNodes(node.nodes, visitor);
|
| }
|
| }
|
|
|