visitSectionHeading method

  1. @override
String visitSectionHeading(
  1. SectionHeadingNode node
)
override

Implementation

@override
String visitSectionHeading(SectionHeadingNode node) {
  final content = node.content
      .map((it) => visit(it))
      .join(" ")
      .collapseSpaces();
  final level = switch (node.level) {
    HeadingLevel.section => "section",
    HeadingLevel.subsection => "subsection",
    HeadingLevel.subsubsection => "subsubsection",
    HeadingLevel.paragraph => "paragraph",
    HeadingLevel.subparagraph => "subparagraph",
  };
  return "$level: $content";
}