我有一个带有一些本地化的terms.en.yml文件,例如:
en:
devise:
registrations:
terms:
text: 'This agreement was written in English (US). To the extent any translated version of this agreement conflicts with the English version, the English version controls. Please note that Section 16 contains certain changes to the general terms for users outside the United States.\n\ Some new line'
Run Code Online (Sandbox Code Playgroud)
我怎么能在那里打破一条线或创建一个段落?
这里有一些信息,但它对我没有帮助,我做错了什么.http://yaml.org/spec/1.1/#b-paragraph-separator
就像是
var tpl = `
<div>
template
<span>string</span>
</div>
`
Run Code Online (Sandbox Code Playgroud)
会产生:
var tpl = "\n<div> \n template\n <span>string</span>\n</div>\n";
Run Code Online (Sandbox Code Playgroud)
我需要的是摆脱额外的空间和可能的换行符,就像所有其他html缩小工具一样.
所以它应该变得类似于:
"<div>template<span>string</span></div>"
Run Code Online (Sandbox Code Playgroud)
有没有什么方法能够明智地实现这一目标并且坚不可摧?