【发布时间】:2013-11-13 16:58:57
【问题描述】:
多行换行符似乎对我不起作用:
类似:
intro: |
We are happy that you are interested in
and
more
and + more 需要在换行符上,但它失败了。
intro: |
| We are happy that you are interested in
| and
| more
或
intro: |
We are happy that you are interested in \n
and
more <2 spaces >
another one
全部失败。
如何在 yaml 文本块中正确使用多行?
我在 Rails 应用程序的 HAML 视图中使用它,例如
= t("mailer.beta_welcome.intro")
但是这种方式没有打印换行符,我需要用 raw 或其他方式输出不同的内容吗?
【问题讨论】:
-
您遇到错误了吗?你的输出是什么?你在期待什么?