Chromium Code Reviews| Index: samples/markdown/block_parser.dart |
| diff --git a/samples/markdown/block_parser.dart b/samples/markdown/block_parser.dart |
| index e136db2a1835ab1ebeb17f57ed8765418bf9e5ce..2f41a424fd38e621e2be616f95b8e4c22e9af556 100644 |
| --- a/samples/markdown/block_parser.dart |
| +++ b/samples/markdown/block_parser.dart |
| @@ -3,39 +3,39 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| /// The line contains only whitespace or is empty. |
| -const _RE_EMPTY = const RegExp(r'^([ \t]*)$'); |
| +const _RE_EMPTY = new RegExp(r'^([ \t]*)$'); |
|
Bob Nystrom
2012/11/12 18:55:05
These will all need to be "final" now, right?
Anders Johnsen
2012/11/13 06:42:32
Yep. Again, looks like we don't test this?
Bob Nystrom
2012/11/13 19:14:13
Nope. :(
This is basically a copy of the markdown
|
| /// A series of `=` or `-` (on the next line) define setext-style headers. |
| -const _RE_SETEXT = const RegExp(r'^((=+)|(-+))$'); |
| +const _RE_SETEXT = new RegExp(r'^((=+)|(-+))$'); |
| /// Leading (and trailing) `#` define atx-style headers. |
| -const _RE_HEADER = const RegExp(r'^(#{1,6})(.*?)#*$'); |
| +const _RE_HEADER = new RegExp(r'^(#{1,6})(.*?)#*$'); |
| /// The line starts with `>` with one optional space after. |
| -const _RE_BLOCKQUOTE = const RegExp(r'^[ ]{0,3}>[ ]?(.*)$'); |
| +const _RE_BLOCKQUOTE = new RegExp(r'^[ ]{0,3}>[ ]?(.*)$'); |
| /// A line indented four spaces. Used for code blocks and lists. |
| -const _RE_INDENT = const RegExp(r'^(?: |\t)(.*)$'); |
| +const _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 = const RegExp(r'^[ ]{0,3}((-+[ ]{0,2}){3,}|' |
| +const _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 = const RegExp(r'^<[ ]*\w+[ >]'); |
| +const _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 = const RegExp(r'^[ ]{0,3}[*+-][ \t]+(.*)$'); |
| +const _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 = const RegExp(r'^[ ]{0,3}\d+\.[ \t]+(.*)$'); |
| +const _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. |