Make helper class private that should not have been exposed (dart-lang/markdown#476)
...in 17d2d4c262d0217e8607814c9c6d98eb138d19d8
diff --git a/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart b/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
index b44923f..0546b93 100644
--- a/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
+++ b/pkgs/markdown/lib/src/inline_syntaxes/link_syntax.dart
@@ -11,12 +11,12 @@
/// A helper class holds params of link context.
/// Footnote creation needs other info in [_tryCreateReferenceLink].
-class LinkContext {
+class _LinkContext {
final InlineParser parser;
final SimpleDelimiter opener;
final List<Node> Function() getChildren;
- const LinkContext(this.parser, this.opener, this.getChildren);
+ const _LinkContext(this.parser, this.opener, this.getChildren);
}
/// Matches links like `[blah][label]` and `[blah](url)`.
@@ -40,7 +40,7 @@
String? tag,
required List<Node> Function() getChildren,
}) {
- final context = LinkContext(parser, opener, getChildren);
+ final context = _LinkContext(parser, opener, getChildren);
final text = parser.source.substring(opener.endPos, parser.pos);
// The current character is the `]` that closed the link text. Examine the
// next character, to determine what type of link we might have (a '('
@@ -163,7 +163,7 @@
///
/// Returns the nodes if it was successfully created, `null` otherwise.
Iterable<Node>? _tryCreateReferenceLink(
- LinkContext context,
+ _LinkContext context,
String label,
) {
final parser = context.parser;