Parcourir la source

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

Fabien Potencier il y a 15 ans
Parent
commit
19f93cb859
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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();