Add quoting for " and '
This commit is contained in:
parent
84ffcafbc2
commit
21049c8d6a
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ fn need_quotes(string: &str) -> bool {
|
|||
|| need_quotes_spaces(string)
|
||||
|| string.contains(|character: char| {
|
||||
match character {
|
||||
':' | '{' | '}' | '[' | ']' | ',' | '&' | '*' | '#' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@' | '`' | '\\' | '\0' ... '\x06' | '\t' | '\n' | '\r' | '\x0e' ... '\x1a' | '\x1c' ... '\x1f' => true,
|
||||
':' | '{' | '}' | '[' | ']' | ',' | '&' | '*' | '#' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@' | '`' | '\"' | '\'' | '\\' | '\0' ... '\x06' | '\t' | '\n' | '\r' | '\x0e' ... '\x1a' | '\x1c' ... '\x1f' => true,
|
||||
_ => false,
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue