Author: fabien
Date: 2010-02-23 11:20:47 +0100 (Tue, 23 Feb 2010)
New Revision: 28202
Modified:
components/yaml/branches/1.0/lib/sfYamlInline.php
components/yaml/trunk/lib/sfYamlInline.php
Log:
[YAML] added ? in the list of characters that trigger quoting (for
compatibility with libyaml - patch from indeyets)
Modified: components/yaml/branches/1.0/lib/sfYamlInline.php
===================================================================
--- components/yaml/branches/1.0/lib/sfYamlInline.php 2010-02-23 10:14:50 UTC
(rev 28201)
+++ components/yaml/branches/1.0/lib/sfYamlInline.php 2010-02-23 10:20:47 UTC
(rev 28202)
@@ -89,7 +89,7 @@
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 "''";
Modified: components/yaml/trunk/lib/sfYamlInline.php
===================================================================
--- components/yaml/trunk/lib/sfYamlInline.php 2010-02-23 10:14:50 UTC (rev
28201)
+++ components/yaml/trunk/lib/sfYamlInline.php 2010-02-23 10:20:47 UTC (rev
28202)
@@ -89,7 +89,7 @@
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 "''";
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.