fn(state$0, line$1, doc_prefix$2) =>
let trimmed$3 = @definy.string-trim(value: $1);
match @core.equal(left: $3, right: "") {
true =>
@markdown.flush(state: $0, doc_prefix: $2),
false =>
match @std.string-starts-with(value: $3, prefix: "```") {
true =>
{blocks: @markdown.flush(state: $0, doc_prefix: $2).blocks, block: #code<@markdown.block>([])},
false =>
let level$4 = @markdown.heading-level(line: $1);
match @core.less-than(left: 0, right: $4) {
true =>
{
blocks: @core.list-append(
list: @markdown.flush(state: $0, doc_prefix: $2).blocks,
item: @html.element(
name: @core.string-concat(left: "h", right: @std.number-to-string(value: $4)),
attributes: [],
children: @markdown.inline(
text: @core.string-slice(value: $1, start: @core.plus(left: $4, right: 1), end: @core.string-length(value: $1)),
doc_prefix: $2
)
)
),
block: #none<@markdown.block>
},
false =>
@markdown.line-text(state: $0, line: $1, trimmed: $3, doc_prefix: $2)
}
}
}