from md

For formats.

Convert markdown text into human-friendly structured rows. Use --verbose for the full AST.

Command Type

built-in

Signature

> from md {flags}

Flags

  • --verbose, -v: Return the full AST with type, position, attrs, and children fields.

Input/output types:

input output
string table

Examples

Reduced mode promotes child rows; heading text is represented as a text element.

> '# Title' | from md | get 0.element
text

Get the text content of the first element.

> '# Title' | from md | get 0.content
Title

Parse markdown frontmatter as a dedicated yaml element.

> '---
title: Demo
---
# A' | from md | get 0.element
yaml

Use —verbose to get the full AST; the first node type is h1.

> '# Title' | from md --verbose | get 0.type
h1

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.