Chromium Code Reviews| Index: lib/src/inline_parser.dart |
| diff --git a/lib/src/inline_parser.dart b/lib/src/inline_parser.dart |
| index 3b1d9faa327e37eda63a04ed6e5ffc8c713de919..9f0db08c5d04e1748a96dce4f9a0d52a58a4683f 100644 |
| --- a/lib/src/inline_parser.dart |
| +++ b/lib/src/inline_parser.dart |
| @@ -43,13 +43,11 @@ class InlineParser { |
| // Parse "**strong**" tags. |
| new TagSyntax(r'\*\*', tag: 'strong'), |
| // Parse "__strong__" tags. |
| - new TagSyntax(r'__', tag: 'strong'), |
| + new TagSyntax(r'\b__', tag: 'strong', end: r'__\b'), |
|
nweiz
2015/09/14 21:52:13
Using \b here isn't very non-English-friendly; it'
Bob Nystrom
2015/09/15 00:19:16
Hmm, good point. I think this is sort of a stopgap
|
| // Parse "*emphasis*" tags. |
| new TagSyntax(r'\*', tag: 'em'), |
| // Parse "_emphasis_" tags. |
| - // TODO(rnystrom): Underscores in the middle of a word should not be |
| - // parsed as emphasis like_in_this. |
| - new TagSyntax(r'_', tag: 'em'), |
| + new TagSyntax(r'\b_', tag: 'em', end: r'_\b'), |
| new CodeSyntax(), |
| // We will add the LinkSyntax once we know about the specific link resolver. |
| ]; |