I used the following code to generate the attached .yml file.
String[] wontParse = {
"ends with cr\r",
"multi\rline",
};
String yaml = Yaml.dump(wontParse);
System.out.println(yaml);
The generated file will not load properly.
The first string errors with an "Unterminated string" error.
org.ho.yaml.exception.YamlException: Error near line 2: Unterminated string
at org.ho.yaml.JYamlParserEvent.error(Unknown Source)
at org.ho.yaml.YamlDecoder.firstDocument(Unknown Source)
at org.ho.yaml.YamlDecoder.readObject(Unknown Source)
at org.ho.yaml.YamlConfig.load(Unknown Source)
The second string does not parse correctly - it terminates at the carriage return.
Sample .yml file