The newlines in multiline YAML values are removed
Description:
When processing multiline YAML values, such as those defined using the | (block scalar) syntax, the current behavior appears to remove newlines. This can result in an unintended transformation of the data and breaks the formatting, as newlines are significant in this context.
Expected Behavior:
The newlines in multiline YAML values defined with | should be preserved exactly as they appear in the original file.
Steps to Reproduce:
- Create a YAML file with the following content:
prompt: | Line 1 Line 2 Line 3 - Process the file with the tool.
- Observe that the newlines are removed.
Proposed Solution:
Update the YAML processing logic to detect and respect the | block scalar syntax and preserve newlines as they are in the input.
Additional Context: Newlines in multiline YAML values are often semantically meaningful, especially when preserving human-readable formatting or when the content interacts with other systems that rely on the YAML specification.