Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Yaml] fixed parsing of simple inline documents

  • Loading branch information...
commit 8fc2cd0d17305ca0fb711700ce6ec75b5332775e 1 parent ffb82ce
@fabpot fabpot authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 Parser.php
View
4 Parser.php
@@ -80,7 +80,7 @@ public function parse($value)
} else {
if (isset($values['leadspaces'])
&& ' ' == $values['leadspaces']
- && preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $values['value'], $matches)
+ && preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $values['value'], $matches)
) {
// this is a compact notation element, add to next block and parse
$c = $this->getRealCurrentLineNb();
@@ -97,7 +97,7 @@ public function parse($value)
$data[] = $this->parseValue($values['value']);
}
}
- } else if (preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $this->currentLine, $values)) {
+ } else if (preg_match('#^(?P<key>'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P<value>.+?))?\s*$#u', $this->currentLine, $values)) {
$key = Inline::parseScalar($values['key']);
if ('<<' === $key) {
Please sign in to comment.
Something went wrong with that request. Please try again.