Skip to content

Commit 40ebeb0

Browse files
gnpricePIG208
authored andcommitted
content [nfc]: Add a bit of dartdoc on parser
1 parent 0bfa79d commit 40ebeb0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/model/content.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,9 @@ enum _ParserContext {
815815
inline,
816816
}
817817

818+
/// Parser for a complete piece of Zulip HTML content, a [ZulipContent].
819+
///
820+
/// The only entry point to this class is [parse].
818821
class _ZulipContentParser {
819822
/// The current state of what sort of nodes the parser is looking for.
820823
///
@@ -1039,6 +1042,8 @@ class _ZulipContentParser {
10391042
return nodes.map(parseInlineContent).toList(growable: false);
10401043
}
10411044

1045+
/// Parse the children of a [BlockInlineContainerNode], making up a
1046+
/// complete subtree of inline content with no further inline ancestors.
10421047
({List<InlineContentNode> nodes, List<LinkNode>? links}) parseBlockInline(List<dom.Node> nodes) {
10431048
assert(_debugParserContext == _ParserContext.block);
10441049
assert(() {
@@ -1660,6 +1665,8 @@ class _ZulipContentParser {
16601665
}
16611666
}
16621667

1668+
/// Parse a complete piece of Zulip HTML content,
1669+
/// such as an entire value of [Message.content].
16631670
ZulipContent parseContent(String html) {
16641671
return _ZulipContentParser().parse(html);
16651672
}

0 commit comments

Comments
 (0)