Check parser.isDone when title is null in _parseInlineBracketedLink (dart-lang/markdown#394)
Otherwise for example markdownToHtml(r'[url](<https://www> "title\")') will throw an exception
diff --git a/pkgs/markdown/lib/src/inline_parser.dart b/pkgs/markdown/lib/src/inline_parser.dart
index 88896e0..e9c5f84 100644
--- a/pkgs/markdown/lib/src/inline_parser.dart
+++ b/pkgs/markdown/lib/src/inline_parser.dart
@@ -1200,7 +1200,8 @@
var char = parser.charAt(parser.pos);
if (char == $space || char == $lf || char == $cr || char == $ff) {
var title = _parseTitle(parser);
- if (title == null && parser.charAt(parser.pos) != $rparen) {
+ if (title == null &&
+ (parser.isDone || parser.charAt(parser.pos) != $rparen)) {
// This looked like an inline link, until we found this $space
// followed by mystery characters; no longer a link.
return null;
diff --git a/pkgs/markdown/test/original/inline_links.unit b/pkgs/markdown/test/original/inline_links.unit
index 4bfd85a..4d910c8 100644
--- a/pkgs/markdown/test/original/inline_links.unit
+++ b/pkgs/markdown/test/original/inline_links.unit
@@ -80,3 +80,8 @@
[foo](link(1.png) (what?)
<<<
<p>[foo](link(1.png) (what?)</p>
+>>> not an inline link: the title's ending quote is escaped
+links [are](<http://example.com> "title\") awesome
+
+<<<
+<p>links [are](<a href="http://example.com">http://example.com</a> "title") awesome</p>
\ No newline at end of file