mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 17:33:12 +02:00
Add pretty flag to to md
(#2640)
* First draft for adding a `pretty` flag to `to md` * rustfmt * Fix Clippy warnings * rustfmt * Using Clippy suggestion broken code, reverting and putting in a statement to ignore clippy warning * Add test for `to md -p`
This commit is contained in:
@ -23,3 +23,15 @@ fn out_md_table() {
|
||||
|
||||
assert_eq!(actual.out, "|name||-||jason|");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn out_md_table_pretty() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo '{"name": "joseph"}' | from json | to md -p
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "|name ||------||joseph|");
|
||||
}
|
||||
|
Reference in New Issue
Block a user