Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: third_party/pkg/angular/lib/tools/html_extractor.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
« no previous file with comments | « third_party/pkg/angular/lib/tools/expression_extractor.dart ('k') | third_party/pkg/angular/lib/tools/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698