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