File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ class HJSONStringifier
1515{
1616
1717 // needsEscape tests if the string can be written without escapes
18- private $ needsEscape = '/[ \\\"\x00-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}\x ]/u ' ;
18+ private $ needsEscape = '/[ \\\"\x00-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}]/u ' ;
1919 // needsQuotes tests if the string can be written as a quoteless string (includes needsEscape but without \\ and \")
20- private $ needsQuotes = '/^ \\s|^"|^ \'|^ \'\'\'|^#|^ \\/ \\*|^ \\/ \\/|^ \\{|^ \\}|^ \\[|^ \\]|^:|^,| \\s$|[\x00-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}\x ]/u ' ;
20+ private $ needsQuotes = '/^ \\s|^"|^ \'|^ \'\'\'|^#|^ \\/ \\*|^ \\/ \\/|^ \\{|^ \\}|^ \\[|^ \\]|^:|^,| \\s$|[\x00-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}]/u ' ;
2121 // needsEscapeML tests if the string can be written as a multiline string (includes needsEscape but without \n, \r, \\ and \")
22- private $ needsEscapeML = '/^ \\s+$| \'\'\'|[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}\x ]/u ' ;
22+ private $ needsEscapeML = '/^ \\s+$| \'\'\'|[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f\x{00ad}\x{0600}-\x{0604}\x{070f}\x{17b4}\x{17b5}\x{200c}-\x{200f}\x{2028}-\x{202f}\x{2060}-\x{206f}\x{feff}\x{fff0}-\x{ffff}]/u ' ;
2323 private $ startsWithKeyword = '/^(true|false|null)\s*((,|\]|\}|#|\/\/|\/\*).*)?$/ ' ;
2424 private $ needsEscapeName = '/[,\{\[\}\]\s:#" \']|\/\/|\/\*| \'\'\'/ ' ;
2525 private $ gap = '' ;
You can’t perform that action at this time.
0 commit comments