InlineParser._defaultSyntaxes: make unmodifiable
diff --git a/pkgs/markdown/lib/src/inline_parser.dart b/pkgs/markdown/lib/src/inline_parser.dart index ccdfa98..bdcb4a3 100644 --- a/pkgs/markdown/lib/src/inline_parser.dart +++ b/pkgs/markdown/lib/src/inline_parser.dart
@@ -11,7 +11,8 @@ /// Maintains the internal state needed to parse inline span elements in /// Markdown. class InlineParser { - static final List<InlineSyntax> _defaultSyntaxes = <InlineSyntax>[ + static final List<InlineSyntax> _defaultSyntaxes = + new List<InlineSyntax>.unmodifiable(<InlineSyntax>[ // This first RegExp matches plain text to accelerate parsing. It's written // so that it does not match any prefix of any following syntaxes. Most // Markdown is plain text, so it's faster to match one RegExp per 'word' @@ -53,7 +54,7 @@ new TagSyntax(r'\b_', tag: 'em', end: r'_\b'), new CodeSyntax(), // We will add the LinkSyntax once we know about the specific link resolver. - ]; + ]); /// The string of Markdown being parsed. final String source;