Explorer

html-ui.docs-title

description
The title of a document: its first line without # , or name when it does not start with a heading
type
Fn(text: String, name: String) -> String
expression
fn(text$0, name$1) =>
  match @std.string-starts-with(value: $0, prefix: "# ") {
    true =>
      let end$2 = @core.string-index-of(text: $0, target: "\n", start: 0);
      @core.string-slice(
        value: $0,
        start: 2,
        end: match @core.less-than(left: $2, right: 0) {
          true =>
            @core.string-length(value: $0),
          false =>
            $2
        }
      ),
    false =>
      $1
  }
visibility
public
html-ui.docs-title (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: OuiJXTHPzlxuRedT0-pQynDyiUwmYM65IjGMfmoEP9E
content hash: 0dpDOYdQOZAb4MxmZqKp_1zL0DjX_wveyx3FrDP8CnI