diff --git a/CHANGELOG.md b/CHANGELOG.md index 555b069..25b6462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.1.3] - 2021-01-29 + +### Fixed + +- Fixed removing quotes from values, so that this is only done where the line starts/and ends with the same quote. + ## [2.1.2] - 2021-01-29 ### Fixed diff --git a/src/YamlParser.php b/src/YamlParser.php index a385a10..c947061 100644 --- a/src/YamlParser.php +++ b/src/YamlParser.php @@ -302,6 +302,7 @@ protected function castValue($value) return ''; } - return trim($value, '"\''); // remove quotes spaces etc + // Remove quotes if they have start and finish + return preg_replace('/^(\'(.*)\'|"(.*)")$/', '$2$3', trim($value)); } }