Marking within the output sequence of several yaml / yaml lines?

Can raw markdown documents be stored in yaml? I tested

key:|+ markdown text block that could have any combination of line breaks, >, -, :, ', " etc etc. 

This does not work. I need something like CDATA or python trata quotes for yamal. Any ideas?

+6
cdata yaml markdown string-literals
source share
1 answer

In a scalar-literal style (what you used in the example), the linear brakes still have to be "shielded" (in this case they are designed correctly).

And you can only have printable characters.

I'm not familiar with markdowns, but if you need to preserve non-printable characters, you will definitely avoid them.

From Yaml specification :

To ensure readability, YAML streams use only a printable subset of the Unicode character set. The allowed character range explicitly excludes the control block C0 # x0- # x1F (except for TAB # x9, LF #xA and CR #xD, which are allowed), DEL # x7F, control C1 block # x80- # x9F (except for NEL # x85 which is allowed), surrogate block # xD800- # xDFFF, #xFFFE and #xFFFF.

At the input, the YAML processor must accept all Unicode characters except those explicitly excluded above.

At the output, the YAML processor should only produce acceptable characters. Any excluded characters must be represented using escape sequences.

+1
source share

All Articles