如何在YAML中断开长字符串(如长url或文件名/路径),而不换行为空格?
示例输入:
url: >
https://example.com/?what=Lorem
%20ipsum%20dolor
%20sit%20amet
输出:
{
"url": "https://example.com/?what=Lorem %20ipsum%20dolor %20sit%20amet"
}
所需输出:
{
"url": "https://example.com/?what=Lorem%20ipsum%20dolor%20sit%20amet"
}
发布于 2014-08-08 17:24:53
事实证明,谷歌在我身上失败了,这个问题已经在这个网站上被问到并回答了:Is there a way to represent a long string that doesnt have any whitespace on multiple lines in a YAML document?
https://stackoverflow.com/questions/25208814
复制相似问题