How do I break a string over multiple lines?

前端 未结 9 1189
有刺的猬
有刺的猬 2020-11-22 01:06

In YAML, I have a string that\'s very long. I want to keep this within the 80-column (or so) view of my editor, so I\'d like to break the string. What\'s the syntax for this

9条回答
  •  难免孤独
    2020-11-22 01:20

    None of the above solutions worked for me, in a YAML file within a Jekyll project. After trying many options, I realized that an HTML injection with
    might do as well, since in the end everything is rendered to HTML:

    name: | In a village of La Mancha
    whose name I don't
    want to remember.

    At least it works for me. No idea on the problems associated to this approach.

提交回复
热议问题