Answer by Irene for How do I break a string in YAML over multiple lines?
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 <br> might do as well, since in the end...
View ArticleAnswer by Arayan Singh for How do I break a string in YAML over multiple lines?
1. Block Notation(plain, flow-style, scalar): Newlines become spaces and extra newlines after the block are removed---# Note: It has 1 new line after the stringcontent: Arbitrary free text over...
View ArticleAnswer by Joe for How do I break a string in YAML over multiple lines?
For situations were the string might contain spaces or not, I prefer double quotes and line continuation with backslashes:key: "String \ with long c\ ontent"But note about the pitfall for the case that...
View ArticleAnswer by phs for How do I break a string in YAML over multiple lines?
To concatenate long lines without whitespace, use double quotes and escape the newlines with backslashes:key: "Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemp\...
View ArticleAnswer by Rvanlaak for How do I break a string in YAML over multiple lines?
In case you're using YAML and Twig for translations in Symfony, and want to use multi-line translations in Javascript, a carriage return is added right after the translation. So even the following...
View ArticleAnswer by Mohsen for How do I break a string in YAML over multiple lines?
You might not believe it, but YAML can do multi-line keys too:?> multi line key: value
View ArticleAnswer by Steve Bennett for How do I break a string in YAML over multiple lines?
There are 56NINE (or 63*, depending how you count) different ways to write multi-line strings in YAML.TL;DRUse > most of the time: interior line breaks are stripped out, although you get one at the...
View ArticleAnswer by Ali Shakiba for How do I break a string in YAML over multiple lines?
To preserve newlines use |, for example:Key: | This is a very long sentence that spans several lines in the YAML but which will be rendered as a string with newlines preserved.is translated to "This is...
View ArticleAnswer by Matt Williamson for How do I break a string in YAML over multiple...
Using yaml folded style. The indention in each line will be ignored. A line break will be inserted at the end.Key: > This is a very long sentence that spans several lines in the YAML but which will...
View ArticleHow do I break a string in YAML over multiple lines?
I have a very long string:Key: 'this is my very very very very very very long string'I would like to express it over multiple shorter lines, e.g.,Key: 'this is my very very very '+'long string'I would...
View ArticleAnswer by arrmani88 for How do I break a string in YAML over multiple lines?
If none of the above solutions work with you, try adding white-space: pre-line on your HTML element, and setting your translation value like this :key: "Line1\nLine2"
View Article