mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Fix quoting of empty string in to nuon
(#7632)
Closes https://github.com/nushell/nushell/issues/7631
This commit is contained in:
committed by
GitHub
parent
b543063749
commit
be31182969
@ -221,6 +221,9 @@ static NEEDS_QUOTES_REGEX: Lazy<Regex> = Lazy::new(|| {
|
||||
});
|
||||
|
||||
fn needs_quotes(string: &str) -> bool {
|
||||
if string.is_empty() {
|
||||
return true;
|
||||
}
|
||||
// These are case-sensitive keywords
|
||||
match string {
|
||||
// `true`/`false`/`null` are active keywords in JSON and NUON
|
||||
|
Reference in New Issue
Block a user