W3cubDocs

/Nushell

to md for formats

Convert table into simple Markdown.

Signature

> to md {flags}

Flags

  • --pretty, -p: Formats the Markdown table to vertically align items
  • --per-element, -e: treat each row as markdown syntax element

Input/output types:

input output
any string

Examples

Outputs an MD string representing the contents of this table

> [[foobar]; [12]] |to md
|foo|bar|
|-|-|
|1|2|

Optionally, output a formatted markdown string

> [[foobar]; [12]] |to md--pretty
| foo|bar|
| ---|---|
| 1|2|

Treat each row as a markdown element

> [{"H1":"Welcome to Nushell" } [[foobar]; [12]]] |to md--per-element--pretty
# Welcome to Nushell
| foo|bar|
| ---|---|
| 1|2|

Render a list

> [012] |to md--pretty
0
1
2

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/to_md.html