mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
fix multiline strings in NDNUON (#14519)
- should close https://github.com/nushell/nushell/issues/14517 # Description this will change `to ndnuon` so that newlines are encoded as a literal `\n` which `from ndnuon` is already able to handle # User-Facing Changes users should be able to encode multiline strings in NDNUON # Tests + Formatting new tests have been added: - they don't pass on the first commit - they do pass with the fix # After Submitting
This commit is contained in:
@ -36,5 +36,5 @@ export def "from ndnuon" []: [string -> any] {
|
||||
|
||||
# Convert structured data to NDNUON, i.e. newline-delimited NUON
|
||||
export def "to ndnuon" []: [any -> string] {
|
||||
each { to nuon --raw } | to text
|
||||
each { to nuon --raw | str replace --all "\n" '\n' } | to text
|
||||
}
|
||||
|
Reference in New Issue
Block a user