#1041·yaml

Encode does not respect Style = LiteralStyle

Author: efd6Created Jul 29, 2024Updated Jan 9, 2025

Running the following program shows the issue; https://go.dev/play/p/dbduWiFiGZO.

Despite setting Style to LiteralStyle for all nodes, the string is printed as a quoted string. The choice of behaviour can be altered by removing some text, though which parts cause the change in behaviour is unclear (for example, this https://go.dev/play/p/AwdkIx8FBSJ gives the desired behaviour with literal string being rendered).