Add support for escape characters, make nuon a JSON superset (#4706)

* WIP

* Finish adding escape support in strings

* Try to fix windows
This commit is contained in:
JT
2022-03-03 13:14:03 -05:00
committed by GitHub
parent 13f2048ffb
commit 7d0531d270
10 changed files with 271 additions and 78 deletions

View File

@ -563,7 +563,7 @@ fn file_path_completion(
) -> Vec<(nu_protocol::Span, String)> {
use std::path::{is_separator, Path};
let partial = partial.replace('\"', "");
let partial = partial.replace('\'', "");
let (base_dir_name, partial) = {
// If partial is only a word we want to search in the current dir
@ -596,7 +596,7 @@ fn file_path_completion(
}
if path.contains(' ') {
path = format!("\"{}\"", path);
path = format!("\'{}\'", path);
}
Some((span, path))