我在RAML中有一个需要很长描述的字段。有没有办法将其分成多行?
示例:
“description”:“这是一个很长的字符串”
我希望它呈现为:
“description”:“这是 一根很长的字符串。“
由于
答案 0 :(得分:3)
您可以使用|
将长行划分为多个部分: -
post:
description: |
Creates a new account. Some **bold** text here. More text. Need to fill the line, so make it longer still. Hooray!
Line two Starts here
参考: - https://github.com/raml2html/raml2html/blob/master/examples/example.raml
另一种选择是使用!
和\n
来打破这一行: -
post:
description: !
"Creates a new account. Some **bold** text here. More text. Need to fill the line, so make it longer still. Hooray!\n
Line two Starts here"
请注意,此处的描述应位于""
双引号
答案 1 :(得分:0)
...
description:
1st line<br>
2nd line<br>
3rd line<br>
或
...
description: 1st line<br>2nd line<br>3rd line<br>
如下所示:
raw raml
produced html