mirror of
https://github.com/nushell/nushell.git
synced 2025-05-05 23:42:56 +00:00
Fixes #14660 # Description Fixed an issue where tables with empty values were incorrectly replaced with [table X row] when converted to Markdown using the ```to md``` command. Empty values are now replaced with whitespaces to preserve the original table structure. Additionally, fixed a missing newline (\n) between tables when using --per-element in a list. Removed (\n) from 2 examples for consistency. Example: ``` For the list let list = [ {name: bob, age: 21} {name: jim, age: 20} {name: sarah}] Running "$list | to md --pretty" outputs: | name | age | | ----- | --- | | bob | 21 | | jim | 20 | | sarah | | ------------------------------------------------------------------------------------------------ For the list let list = [ {name: bob, age: 21} {name: jim, age: 20} {name: sarah} {name: timothy, age: 50} {name: paul} ] Running "$list | to md --per-element --pretty" outputs: | name | age | | ------- | --- | | bob | 21 | | jim | 20 | | timothy | 50 | | name | | ----- | | sarah | | paul | ``` # User-Facing Changes The ```to md``` behaves as expected when piping a table that contains empty values showing all rows and the empty items replaced with whitespace. # Tests + Formatting Added 2 test cases to cover both issues. fmt + clippy OK. # After Submitting The command documentation needs to be updated with an example for when you want to "separate list into markdown tables"
This crate contains the majority of our commands
We allow ourselves to move some of the commands in nu-command
to nu-cmd-*
crates as needed.
Internal Nushell crate
This crate implements components of Nushell and is not designed to support plugin authors or other users directly.