Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

from md for formats

Convert markdown text into structured data.

Signature

> from md {flags}

Input/output types:

inputoutput
stringtable

Examples

Parse markdown and return key node fields.

> '# Title' | from md | select type position attrs
╭───┬──────┬────────────────────────────┬───────────────╮
│ # │ type │          position          │     attrs     │
├───┼──────┼────────────────────────────┼───────────────┤
│ 0 │ h1   │ ╭───────┬────────────────╮ │ ╭───────┬───╮ │
│   │      │ │       │ ╭────────┬───╮ │ │ │ depth │ 1 │ │
│   │      │ │ start │ │ line   │ 1 │ │ │ │ level │ 1 │ │
│   │      │ │       │ │ column │ 1 │ │ │ ╰───────┴───╯ │
│   │      │ │       │ ╰────────┴───╯ │ │               │
│   │      │ │       │ ╭────────┬───╮ │ │               │
│   │      │ │ end   │ │ line   │ 1 │ │ │               │
│   │      │ │       │ │ column │ 8 │ │ │               │
│   │      │ │       │ ╰────────┴───╯ │ │               │
│   │      │ ╰───────┴────────────────╯ │               │
╰───┴──────┴────────────────────────────┴───────────────╯

Parse markdown frontmatter as a dedicated node.

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