Browse Source

[Yaml] fixed compact notation when there is an inlined hash (closes #8082)

Fabien Potencier 15 năm trước cách đây
mục cha
commit
19f93cb859
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Symfony/Components/Yaml/Parser.php

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

@@ -89,7 +89,7 @@ class Parser
           }
           elseif (isset($values['leadspaces'])
             && ' ' == $values['leadspaces']
-            && preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"].*?) *\:(\s+(?P<value>.+?))?\s*$#', $values['value'], $matches))
+            && preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P<value>.+?))?\s*$#', $values['value'], $matches))
           {
             // this is a compact notation element, add to next block and parse
             $c = $this->getRealCurrentLineNb();