3
是否可以在YAML多行字符串中使用Unicode字符轉義(例如\u2009
)?如何在YAML多行字符串中進行Unicode轉義?
this_escape_works: "foo\u2009bar"
this_escape_doesnt: >
foo\u2009bar
是否可以在YAML多行字符串中使用Unicode字符轉義(例如\u2009
)?如何在YAML多行字符串中進行Unicode轉義?
this_escape_works: "foo\u2009bar"
this_escape_doesnt: >
foo\u2009bar
按the YAML1.2 spec雙引號風格的標量是:
唯一的風格能夠表達任意字符串,通過使用「\」轉義序列。這是以不得不逃離「\」和「「」字符的成本。
所以折純量不支持逃逸,你所要做的
this_escape_works: "foo\u2009bar"
this_escape_doesnt: "foo\u2009bar\n"
請注意,違背@ nj_要求摺疊指標>
(它不是運營商)一般不會做「換行符變成空格」,肯定不是the final line break