From 312efa5d05432b063780ae29bfcdc0f83ecd6cb7 Mon Sep 17 00:00:00 2001 From: Tom Parker Date: Sun, 12 Mar 2017 16:02:47 +0000 Subject: [PATCH] Add quoting for " and ' --- parser/src/emitter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/src/emitter.rs b/parser/src/emitter.rs index 308bd93..0d2defa 100644 --- a/parser/src/emitter.rs +++ b/parser/src/emitter.rs @@ -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, } })