Yaml 多行字符串不进行分析
我不明白为什么第一个YAML多行字符串会被解析,但是 作为值嵌入的第二个值不分析:Yaml 多行字符串不进行分析,yaml,Yaml,我不明白为什么第一个YAML多行字符串会被解析,但是 作为值嵌入的第二个值不分析: ignore_newlines: > this is really a single line of text despite appearances xmas: { day: "Dec 25", another_ignore_newlines: > this is really a
ignore_newlines: >
this is really a
single line of text
despite appearances
xmas: {
day: "Dec 25",
another_ignore_newlines: >
this is really a
single line of text
despite appearances
cleanup: "Dec 26"
}
这可能只是YAML的另一个“奇怪之处”,但为什么……?。而xmas
的值是一个流样式映射,它包含另一个\u ignore\u newlines
的(折叠文字)块样式标量值。
这不起作用,因为在清理之前的行上还应该有一个尾随,
尝试删除{
和}
以及“Dec 25”
后面的逗号:
ignore_newlines: >
this is really a
single line of text
despite appearances
xmas:
day: "Dec 25"
another_ignore_newlines: >
this is really a
single line of text
despite appearances
cleanup: "Dec 26"