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

Unified Diff: utils/apidoc/mdn/extract.dart

Issue 11369210: Make RegExp constructor non-const. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up status files. Created 8 years, 1 month 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
« no previous file with comments | « utils/apidoc/html_diff.dart ('k') | utils/pub/git_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/mdn/extract.dart
diff --git a/utils/apidoc/mdn/extract.dart b/utils/apidoc/mdn/extract.dart
index 577ed36c856bee6113be1d9987f96d3d66fe6eab..4a37154995653f381fb1e6944f9d275896d21cdf 100644
--- a/utils/apidoc/mdn/extract.dart
+++ b/utils/apidoc/mdn/extract.dart
@@ -691,7 +691,7 @@ bool isObsolete(Element e) {
}
bool isFirstCharLowerCase(String str) {
- return const RegExp("^[a-z]").hasMatch(str);
+ return new RegExp("^[a-z]").hasMatch(str);
}
/**
@@ -943,8 +943,8 @@ String trimHtml(String html) {
}
bool maybeName(String name) {
- return const RegExp("^[a-z][a-z0-9A-Z]+\$").hasMatch(name) ||
- const RegExp("^[A-Z][A-Z_]*\$").hasMatch(name);
+ return new RegExp("^[a-z][a-z0-9A-Z]+\$").hasMatch(name) ||
+ new RegExp("^[A-Z][A-Z_]*\$").hasMatch(name);
}
// TODO(jacobr): this element is ugly at the moment but will become easier to
@@ -967,7 +967,7 @@ String JSONFIXUPHACK(String value) {
}
String mozToWebkit(String name) {
- return name.replaceFirst(const RegExp("^moz"), "webkit");
+ return name.replaceFirst(new RegExp("^moz"), "webkit");
}
String stripWebkit(String name) {
@@ -1121,10 +1121,10 @@ void run() {
}
// Fix up links.
- const SHORT_LINK = const RegExp(r'^[\w/]+$');
- const INNER_LINK = const RegExp(r'[Ee]n/(?:[\w/]+/|)([\w#.]+)(?:\(\))?$');
- const MEMBER_LINK = const RegExp(r'(\w+)[.#](\w+)');
- const RELATIVE_LINK = const RegExp(r'^(?:../)*/?[Ee][Nn]/(.+)');
+ final SHORT_LINK = new RegExp(r'^[\w/]+$');
+ final INNER_LINK = new RegExp(r'[Ee]n/(?:[\w/]+/|)([\w#.]+)(?:\(\))?$');
+ final MEMBER_LINK = new RegExp(r'(\w+)[.#](\w+)');
+ final RELATIVE_LINK = new RegExp(r'^(?:../)*/?[Ee][Nn]/(.+)');
// - Make relative links absolute.
// - If we can, take links that point to other MDN pages and retarget them
« no previous file with comments | « utils/apidoc/html_diff.dart ('k') | utils/pub/git_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698