gpt4 book ai didi

没有空格的 YAML 折叠

转载 作者:行者123 更新时间:2023-12-02 01:46:43 27 4
gpt4 key购买 nike

如何在 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"
}

最佳答案

原来谷歌在我身上失败了,这个问题已经在这个网站上提出并回答了:Is there a way to represent a long string that doesnt have any whitespace on multiple lines in a YAML document?

关于没有空格的 YAML 折叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25208814/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com