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

Unified Diff: sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart

Issue 11362219: Fix const RegExp -> final RegExp in a dartdoc file. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart b/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
index 6c5cff935cd6bdbb8c1110eb5a9d8b063433bca0..18f7d5a548b513126c982ac796bec60d463528c3 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart
@@ -5,39 +5,39 @@
part of markdown;
/// The line contains only whitespace or is empty.
-const _RE_EMPTY = new RegExp(r'^([ \t]*)$');
+final _RE_EMPTY = new RegExp(r'^([ \t]*)$');
/// A series of `=` or `-` (on the next line) define setext-style headers.
-const _RE_SETEXT = new RegExp(r'^((=+)|(-+))$');
+final _RE_SETEXT = new RegExp(r'^((=+)|(-+))$');
/// Leading (and trailing) `#` define atx-style headers.
-const _RE_HEADER = new RegExp(r'^(#{1,6})(.*?)#*$');
+final _RE_HEADER = new RegExp(r'^(#{1,6})(.*?)#*$');
/// The line starts with `>` with one optional space after.
-const _RE_BLOCKQUOTE = new RegExp(r'^[ ]{0,3}>[ ]?(.*)$');
+final _RE_BLOCKQUOTE = new RegExp(r'^[ ]{0,3}>[ ]?(.*)$');
/// A line indented four spaces. Used for code blocks and lists.
-const _RE_INDENT = new RegExp(r'^(?: |\t)(.*)$');
+final _RE_INDENT = new RegExp(r'^(?: |\t)(.*)$');
/// Three or more hyphens, asterisks or underscores by themselves. Note that
/// a line like `----` is valid as both HR and SETEXT. In case of a tie,
/// SETEXT should win.
-const _RE_HR = new RegExp(r'^[ ]{0,3}((-+[ ]{0,2}){3,}|'
+final _RE_HR = new RegExp(r'^[ ]{0,3}((-+[ ]{0,2}){3,}|'
r'(_+[ ]{0,2}){3,}|'
r'(\*+[ ]{0,2}){3,})$');
/// Really hacky way to detect block-level embedded HTML. Just looks for
/// "<somename".
-const _RE_HTML = new RegExp(r'^<[ ]*\w+[ >]');
+final _RE_HTML = new RegExp(r'^<[ ]*\w+[ >]');
/// A line starting with one of these markers: `-`, `*`, `+`. May have up to
/// three leading spaces before the marker and any number of spaces or tabs
/// after.
-const _RE_UL = new RegExp(r'^[ ]{0,3}[*+-][ \t]+(.*)$');
+final _RE_UL = new RegExp(r'^[ ]{0,3}[*+-][ \t]+(.*)$');
/// A line starting with a number like `123.`. May have up to three leading
/// spaces before the marker and any number of spaces or tabs after.
-const _RE_OL = new RegExp(r'^[ ]{0,3}\d+\.[ \t]+(.*)$');
+final _RE_OL = new RegExp(r'^[ ]{0,3}\d+\.[ \t]+(.*)$');
/// Maintains the internal state needed to parse a series of lines into blocks
/// of markdown suitable for further inline parsing.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698