Literal Block Scalars - yaml/YAML2 GitHub Wiki

NOTE: This page was blank, so I am not sure what it's intent is. I am going to add an idea to it that I think the title indicates it could be. If that isn't the intent, then please copy the following to another page. Thanks.

YAML default block scalar should be a literal block. Past discussions have supported the idea the ultimately the consuming application should have advantage. As such, the consuming application can format a scaler as needed. Folding, for instance, can be achieve by a simple processing function in-app. Technically it is thus not even necessary for YAML to have any other block formats.

Also, YAML is not a markup language (by it's very definition!) and folding text suggests the needs of markup language rather the a serialization language.

Of course there are times when folding is desirable. Per the Folded Block Scalars page, I think using a single " character as the folding indicator is very intuitive by comparison to the current > indicator, for the simple reason that it is akin the form of single-line scalar. We just drop the trailing quote b/c indention suffices. e.g.

folded paragraph: "
  This means that when you have a folded paragraph, you don't need to put
  the first line on the same line as the key (to avoid the extra space).

Of course, there are some points of exception to literal as default that might need address, such as character escaping. And if I recall correctly there was a question about how this would effect a document that contained only a single string (but sorry, I can't seem to remember exactly the problem. anyone?)

⚠️ **GitHub.com Fallback** ⚠️