Gleb Kashkin
authored
Added tarantool.compat option that allows yaml.encode() to encodes all strings containing a newline in a more convenient block scalar style. This is a breaking change, programs that rely on precise lyaml encoding may fail if the new behavior is selected. Closes #3012 Requires #7060 Requires #8007 @TarantoolBot document Title: YAML formatter improvement Now yaml.encode() can encode strings with a newline in block scalar style, see https://yaml.org/spec/1.2-old/spec.html#style/block/literal and https://github.com/tarantool/tarantool/wiki/compat%3Ayaml_pretty_multiline old: ``` tarantool> compat.yaml_pretty_multiline = 'old' --- ... tarantool> return "Title: xxx\n- Item 1\n- Item 2\n" --- - 'Title: xxx - Item 1 - Item 2 ' ... ``` new: ``` tarantool> compat.yaml_pretty_multiline = 'new' --- ... tarantool> return "Title: xxx\n- Item 1\n- Item 2\n" --- - | Title: xxx - Item 1 - Item 2 ... ```
Name | Last commit | Last update |
---|