Open lukasbestle opened 7 years ago
Test case:
$data = [ [ 'name' => 'Lorem ipsum', 'quote' => 'Dolor sit amet.' ], [ 'name' => 'Consetetur sadipscing', 'quote' => '"Elitr sed diam nonumy eirmod."' ] ]; echo Spyc::YAMLDump($data);
Also see https://github.com/getkirby/panel/issues/892#issuecomment-233149158.
Expected behavior:
The second entry is quoted by Spyc so that the quotes around the string get preserved:
- name: Lorem ipsum quote: Dolor sit amet. - name: Consetetur sadipscing quote: '"Elitr sed diam nonumy eirmod."'
Actual behavior:
The string is used as-is without quoting:
- name: Lorem ipsum quote: Dolor sit amet. - name: Consetetur sadipscing quote: "Elitr sed diam nonumy eirmod."
When parsing that YAML string again, the quotes are removed.
Test case:
Also see https://github.com/getkirby/panel/issues/892#issuecomment-233149158.
Expected behavior:
The second entry is quoted by Spyc so that the quotes around the string get preserved:
Actual behavior:
The string is used as-is without quoting:
When parsing that YAML string again, the quotes are removed.