Open scolby33 opened 9 months ago
Hello Scott,
That's an interesting question.
I'm not sure what's best, but it's always possible to avoid double-quotes if one wants.
Here are 4 examples of writing the exact same value (needs a newline\n
):
"needs a newline\n"
'needs a newline
'
>
needs a newline
|
needs a newline
I use the below configuration, but came across the need to encode a string that contained a newline character, like so
foo: "needs a newline\n"
. It's possible I'm missing something obvious, but shouldquote-type: single
allow double-quoted strings that contain escapes? I realize that could mess people up in some cases, so maybe a new option should be added? If not, my solution for the moment is adding# yamllint disable-line rule:quoted-strings
in the few places it turns out I need a newline.