mirror of
https://github.com/nushell/nushell.git
synced 2025-06-01 07:35:49 +02:00
remove raw flag from ndnuon
This commit is contained in:
parent
51741ed8b2
commit
beedf6fa6a
@ -96,8 +96,8 @@ export def equal [left: any, right: any, message?: string] {
|
|||||||
}
|
}
|
||||||
text: (
|
text: (
|
||||||
"These are not equal.\n"
|
"These are not equal.\n"
|
||||||
+ $" Left : '($left | to nuon --raw)'\n"
|
+ $" Left : '($left | to nuon)'\n"
|
||||||
+ $" Right : '($right | to nuon --raw)'"
|
+ $" Right : '($right | to nuon)'"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ export def "not equal" [left: any, right: any, message?: string] {
|
|||||||
start: (metadata $left).span.start
|
start: (metadata $left).span.start
|
||||||
end: (metadata $right).span.end
|
end: (metadata $right).span.end
|
||||||
}
|
}
|
||||||
text: $"These are both '($left | to nuon --raw)'."
|
text: $"These are both '($left | to nuon)'."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ export def length [left: list, right: int, message?: string] {
|
|||||||
}
|
}
|
||||||
text: (
|
text: (
|
||||||
"This does not have the correct length:\n"
|
"This does not have the correct length:\n"
|
||||||
+ $" value : ($left | to nuon --raw)\n"
|
+ $" value : ($left | to nuon)\n"
|
||||||
+ $" length : ($left | core length)\n"
|
+ $" length : ($left | core length)\n"
|
||||||
+ $" expected : ($right)"
|
+ $" expected : ($right)"
|
||||||
)
|
)
|
||||||
@ -231,7 +231,7 @@ export def "str contains" [left: string, right: string, message?: string] {
|
|||||||
}
|
}
|
||||||
text: (
|
text: (
|
||||||
$"This does not contain '($right)'.\n"
|
$"This does not contain '($right)'.\n"
|
||||||
+ $" value: ($left | to nuon --raw)"
|
+ $" value: ($left | to nuon)"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,5 @@ export def "from ndnuon" []: [string -> any] {
|
|||||||
|
|
||||||
# Convert structured data to newline-delimited NUON (NDNUON)
|
# Convert structured data to newline-delimited NUON (NDNUON)
|
||||||
export def "to ndnuon" []: [any -> string] {
|
export def "to ndnuon" []: [any -> string] {
|
||||||
each { to nuon --raw | str replace --all "\n" '\n' } | to text
|
each { to nuon | str replace --all "\n" '\n' } | to text
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user