Explorer

markdown.line

description
Read one line of markdown.to-html
type
Fn(state: @markdown.state, line: String, doc_prefix: String) -> @markdown.state
expression
fn(state$0, line$1, doc_prefix$2) =>
  match $0.block {
    #code(lines$3) =>
      match @std.string-starts-with(value: @definy.string-trim(value: $1), prefix: "```") {
        true =>
          @markdown.flush(state: $0, doc_prefix: $2),
        false =>
          {blocks: $0.blocks, block: #code<@markdown.block>(@core.list-append(list: $3, item: $1))}
      },
    _ =>
      @markdown.line-outside-code(state: $0, line: $1, doc_prefix: $2)
  }
visibility
public
markdown.line (project markdown, branch main, snapshot A_DQB42norQipCLzT0TSP-ZbZiC-EXHKoYK6tAFWTC0)
id: _MnFXEHE_mpshyVclgW4Cn-jlfOax2Dv2ztjxyDe9cY
content hash: YDuhxUGMKd4cycikEd0ehUnx53GjKvxNA8haNzwXiWg