Description
I believe \n in a dict key is valid YAML, and it messes up yamlfix output.
Steps to reproduce
Input
---
list:
- "unquote"
- "{single quote}"
- "double\nquote"
dict:
"unquote": true
"{single quote}": 1
"double\nquote": ok
Minimal input
---
dict:
"double\nquote": ok
Output of yamlfix v1.19.1:
---
list:
- unquote
- '{single quote}'
- "double\nquote"
dict:
unquote: true
'{single quote}': 1
? "double\nquote"
: ok
Output of minimal:
---
dict:
? "double\nquote"
: ok
Current behavior
---
list:
- unquote
- '{single quote}'
- "double\nquote"
dict:
unquote: true
'{single quote}': 1
? "double\nquote"
: ok
Desired behavior
---
list:
- unquote
- '{single quote}'
- "double\nquote"
dict:
unquote: true
'{single quote}': 1
"double\nquote": ok
Environment
uvx yamlfix <filename>.yml
pyproject.toml
[tool.yamlfix]
sequence_style = "block_style"
whitelines = 1
Description
I believe
\nin a dict key is valid YAML, and it messes up yamlfix output.Steps to reproduce
Input
Minimal input
Output of yamlfix v1.19.1:
Output of minimal:
Current behavior
Desired behavior
Environment
uvx yamlfix <filename>.ymlpyproject.toml