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

Unified Diff: samples/markdown/inline_parser.dart

Issue 10910253: Change RegExp constructor to insist on proper named optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update co19/dart2js status. Created 8 years, 3 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
« no previous file with comments | « runtime/lib/regexp_patch.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/markdown/inline_parser.dart
diff --git a/samples/markdown/inline_parser.dart b/samples/markdown/inline_parser.dart
index 053276bcbf08f387c2e7d69755142e652d9044a0..2a71759149c81256c231d05dd3bfcb02e83759c4 100644
--- a/samples/markdown/inline_parser.dart
+++ b/samples/markdown/inline_parser.dart
@@ -140,8 +140,7 @@ class InlineSyntax {
final RegExp pattern;
InlineSyntax(String pattern)
- : pattern = new RegExp(pattern, true);
- // TODO(rnystrom): Should use named arg for RegExp multiLine.
+ : pattern = new RegExp(pattern, multiLine: true);
bool tryMatch(InlineParser parser) {
final startMatch = pattern.firstMatch(parser.currentSource);
@@ -205,10 +204,9 @@ class TagSyntax extends InlineSyntax {
TagSyntax(String pattern, [String tag, String end = null])
: super(pattern),
- endPattern = new RegExp((end != null) ? end : pattern, true),
+ endPattern = new RegExp((end != null) ? end : pattern, multiLine: true),
tag = tag;
// TODO(rnystrom): Doing this.field doesn't seem to work with named args.
- // TODO(rnystrom): Should use named arg for RegExp multiLine.
bool onMatch(InlineParser parser, Match match) {
parser._stack.add(new TagState(parser.pos,
« no previous file with comments | « runtime/lib/regexp_patch.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698