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

Side by Side Diff: pkg/dartdoc/lib/src/markdown/inline_parser.dart

Issue 11339056: Cleanup run on DartDoc from Dart Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of markdown;
6
5 /// Maintains the internal state needed to parse inline span elements in 7 /// Maintains the internal state needed to parse inline span elements in
6 /// markdown. 8 /// markdown.
7 class InlineParser { 9 class InlineParser {
8 static List<InlineSyntax> get syntaxes { 10 static List<InlineSyntax> get syntaxes {
9 // Lazy initialize. 11 // Lazy initialize.
10 if (_syntaxes == null) { 12 if (_syntaxes == null) {
11 _syntaxes = <InlineSyntax>[ 13 _syntaxes = <InlineSyntax>[
12 // This first regexp matches plain text to accelerate parsing. It must 14 // This first regexp matches plain text to accelerate parsing. It must
13 // be written so that it does not match any prefix of any following 15 // be written so that it does not match any prefix of any following
14 // syntax. Most markdown is plain text, so it is faster to match one 16 // syntax. Most markdown is plain text, so it is faster to match one
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 parser.consume(endMatch[0].length); 401 parser.consume(endMatch[0].length);
400 } else { 402 } else {
401 // Didn't close correctly so revert to text. 403 // Didn't close correctly so revert to text.
402 parser.start = startPos; 404 parser.start = startPos;
403 parser.advanceBy(endMatch[0].length); 405 parser.advanceBy(endMatch[0].length);
404 } 406 }
405 407
406 return null; 408 return null;
407 } 409 }
408 } 410 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698