Fix needs_quotes() in to nuon (closes #6989) (#7056)

* to nuon: fix needs_quotes()

Also, null now serialises as null instead of $nothing.

* Clippy

* Add missing quote

* Remove two unnecessary characters

* Add short datetime tests

* Make regex simplificatified

* Alphabetise 'use' statements

* Improve perf by putting case-insensitive cases in regex

* Fix 1 test
This commit is contained in:
Leon
2022-11-19 21:09:39 +10:00
committed by GitHub
parent 6454bf69aa
commit c98a6705e6
6 changed files with 61 additions and 29 deletions

View File

@ -85,6 +85,7 @@ impl Command for FromNuon {
let mut error = None;
// Most of the 'work' in converting from Nuon is simply pushing it through the Nu parser.
let (lexed, err) = nu_parser::lex(string_input.as_bytes(), 0, &[b'\n', b'\r'], &[], true);
error = error.or(err);