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

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

Issue 189333002: pkg/docgen: update markdown to 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updates Created 6 years, 9 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 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; 5 library markdown.inline_parser;
6
7 import 'ast.dart';
8 import 'document.dart';
9 import 'util.dart';
6 10
7 /// Maintains the internal state needed to parse inline span elements in 11 /// Maintains the internal state needed to parse inline span elements in
8 /// markdown. 12 /// markdown.
9 class InlineParser { 13 class InlineParser {
10 static List<InlineSyntax> defaultSyntaxes = <InlineSyntax>[ 14 static List<InlineSyntax> defaultSyntaxes = <InlineSyntax>[
11 // This first regexp matches plain text to accelerate parsing. It must 15 // This first regexp matches plain text to accelerate parsing. It must
12 // be written so that it does not match any prefix of any following 16 // be written so that it does not match any prefix of any following
13 // syntax. Most markdown is plain text, so it is faster to match one 17 // syntax. Most markdown is plain text, so it is faster to match one
14 // regexp per 'word' rather than fail to match all the following regexps 18 // regexp per 'word' rather than fail to match all the following regexps
15 // at each non-syntax character position. It is much more important 19 // at each non-syntax character position. It is much more important
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 parser.consume(endMatch[0].length); 414 parser.consume(endMatch[0].length);
411 } else { 415 } else {
412 // Didn't close correctly so revert to text. 416 // Didn't close correctly so revert to text.
413 parser.start = startPos; 417 parser.start = startPos;
414 parser.advanceBy(endMatch[0].length); 418 parser.advanceBy(endMatch[0].length);
415 } 419 }
416 420
417 return null; 421 return null;
418 } 422 }
419 } 423 }
OLDNEW
« no previous file with comments | « third_party/pkg/markdown/lib/src/html_renderer.dart ('k') | third_party/pkg/markdown/lib/src/markdown/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698