atxHeading method
ATX heading (# Heading up to ###### Heading).
Implementation
Parser<HeadingNode> atxHeading() =>
seq7(
position(),
ref0(nonIndentSpace),
pattern('#').repeatString(1, 6),
ref0(spPlus),
ref0(atxHeadingInlines),
seq4(
ref0(sp),
pattern('#').star(),
ref0(sp),
[ref0(newlineSequence), endOfInput()].toChoiceParser(),
),
position(),
).map7(
(start, _, hashes, _, content, _, stop) => HeadingNode(
hashes.length,
_trimTrailing(content),
start: start,
stop: stop,
),
);