You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 should quote-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.
The text was updated successfully, but these errors were encountered:
scolby33
changed the title
quote-type: single should allow double-quoted strings with escape sequences
quote-type: single should (maybe?) allow double-quoted strings with escape sequences
Nov 17, 2023
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):
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.The text was updated successfully, but these errors were encountered: