Open disposedtrolley opened 4 years ago
It looks like this bug will need to be reported to https://github.com/prettier/prettier because I can reproduce it on the prettier playground
Looks like line length is what triggers it https://github.com/prettier/prettier/issues/7625
@JPinkney The issue within Prettier has been resolved within the following pull request: https://github.com/prettier/prettier/pull/10874
This change is published with version 2.3.1
, this extension uses version 2.2.1
. If you could upgrade the dependency to at least version 2.3.1
that would be greatly appreciated! 😃
I just experienced this bug today. Can confirm that a long line triggered the bug. Would love to see a fix as I'm not familiar with the VSCode extensions development enough to propose one.
This should probably be closed by now, but I ended up hitting the same issue with version v1.14.0. The line is formatted to ternary after 80 char.
this_is_a_short_property: |
some data
this_is_a_long_propertyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyabc:
|
some data
? this_is_a_long_propertyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyabcd
: |
some data
Hello!
I'm experiencing a very strange bug that's sure to pique your interest. I have a fairly large YAML file, a section of which contains maps like the following:
When I attempt to format the YAML document by selecting
Format Document
in the Command Palette, ternary operators (!) are inserted into various locations:You can reproduce this by creating a YAML file with the contents of the first code block above, and attempting to format it.
I'm running version
0.6.1
of the extension and version1.41
of VS Code, on macOS 10.15.2