dart-lang / markdown

A Dart markdown library
https://pub.dev/packages/markdown
BSD 3-Clause "New" or "Revised" License
455 stars 200 forks source link

RangeErrors in link_syntax.dart #623

Closed andrechalella closed 1 month ago

andrechalella commented 1 month ago

Markdown source strings that terminate with the following throw RangeError in lib/src/inline_syntaxes/link_syntax.dart:

  1. [](<
  2. [](<>
  3. [](<
  4. [](www.example.com "
  5. [](www.example.com "\
  6. [][\

The problem is lack of EOF checking after several parser.advanceBy(1); lines in that file.

This is related to https://github.com/flutter/flutter/issues/155020.