Explorar el Código

[Yaml] added backtick to the list of characters that trigger quotes as it is reserved for future use (patch from indeyets)

Fabien Potencier hace 15 años
padre
commit
caa7cc8d64
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/Symfony/Components/Yaml/Inline.php

+ 1 - 1
src/Symfony/Components/Yaml/Inline.php

@@ -80,7 +80,7 @@ class Inline
         return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value);
       case false !== strpos($value, "\n") || false !== strpos($value, "\r"):
         return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value));
-      case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \#] | \A[ - ? | < > = ! % @ ]/x', $value):
+      case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \#] | \A[ - ? | < > = ! % @ ` ]/x', $value):
         return sprintf("'%s'", str_replace('\'', '\'\'', $value));
       case '' == $value:
         return "''";