Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lamnhan066 committed Sep 21, 2023
1 parent b35e29c commit 0bb0998
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,13 @@ class AttributedTextMarkdownSerializer extends AttributionVisitor {
}
}

/// [DocumentNodeMarkdownSerializer] for serializing [ParagraphNode]s as headers.
/// [DocumentNodeMarkdownSerializer], which serializes Markdown headers to
/// [ParagraphNode]s with an appropriate header block type, and (optionally) a
/// block alignment.
///
/// We already had a header parser in [ParagraphNodeSerializer] but without the alignment,
/// so we added [HeaderNodeSerializer] to support the alignment for headers. Therefore,
/// the [HeaderNodeSerializer] **MUST** be put before the [ParagraphNodeSerializer].
/// Headers are represented by `ParagraphNode`s and therefore this serializer must
/// run before a [ParagraphNodeSerializer], so that this serializer can process
/// header-specific details, such as header alignment.
class HeaderNodeSerializer extends NodeTypedDocumentNodeMarkdownSerializer<ParagraphNode> {
const HeaderNodeSerializer(this.markdownSyntax);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,9 @@ class _TaskSyntax extends md.BlockSyntax {

/// Parses a header preceded by an alignment token.
///
/// We already had a header serializer in [_ParagraphWithAlignmentSyntax] but without the alignment,
/// so we added [_HeaderWithAlignmentSyntax] to support the alignment for headers. Therefore,
/// the [_HeaderWithAlignmentSyntax] **MUST** be put before the [_ParagraphWithAlignmentSyntax].
/// Headers are represented by `_ParagraphWithAlignmentSyntax`s and therefore
/// this parser must run before a [_ParagraphWithAlignmentSyntax], so that this parser
/// can process header-specific details, such as header alignment.
class _HeaderWithAlignmentSyntax extends md.BlockSyntax {
/// This pattern matches the text alignment notation.
///
Expand Down

0 comments on commit 0bb0998

Please sign in to comment.