[markdown] Reject unescaped '(' in parenthesized inline link titles
diff --git a/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart b/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
index 789d566..afb7624 100644
--- a/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
+++ b/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
@@ -465,6 +465,8 @@
         buffer.writeCharCode(next);
       } else if (char == closeDelimiter) {
         break;
+      } else if (delimiter == $lparen && char == $lparen) {
+        return null;
       } else {
         buffer.writeCharCode(char);
       }
diff --git a/pkgs/markdown/test/regression_test.dart b/pkgs/markdown/test/regression_test.dart
index 67a7f05..596c56c 100644
--- a/pkgs/markdown/test/regression_test.dart
+++ b/pkgs/markdown/test/regression_test.dart
@@ -239,6 +239,7 @@
       const count = 8000;
       final unclosedBare = '[a]((' * count;
       final unclosedBracketed = '[a](<' * count;
+      final unclosedParenTitle = '[a](b (' * count;
       final unbalancedBeforeTitle = '[a](b( "t")' * count;
 
       final time = Stopwatch()..start();
@@ -248,6 +249,10 @@
         '<p>${'[a](&lt;' * count}</p>\n',
       );
       expect(
+        markdownToHtml(unclosedParenTitle),
+        '<p>$unclosedParenTitle</p>\n',
+      );
+      expect(
         markdownToHtml(unbalancedBeforeTitle),
         '<p>${'[a](b( &quot;t&quot;)' * count}</p>\n',
       );