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'm attempting to embed a 50+ line INI file in a ConfigMap as a string. Whenever I save the file that section loses all of its formatting and it gets squashed into a single line sprinkled with literal \n and "magic line" comment blocks. This makes the embedded INI file unreadable for editing the configuration values so I have to go in and manually find-replace the formatting back how it was and re-indent the block.
Expected Behavior
Format-on-save should not mangle multiline strings. Newlines exist for a reason.
Current Behavior
Format-on-save mangles my strings.
Steps to Reproduce
Create the following YAML file in VSCode:
apiVersion: v1
kind: ConfigMap
metadata:
name: foo
namespace: bar
data:
baz.ini: |+
"[section1]
a = b
x = y
[section2]
foo=bar"
Save the file.
Environment
Windows
Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
A workaround is to select "Format Document With..." on the context menu, and choose "YAML" rather than "Kubernetes YAML". Seems it is the latter extension that's responsible for this problem.
Describe the bug
I'm attempting to embed a 50+ line INI file in a ConfigMap as a string. Whenever I save the file that section loses all of its formatting and it gets squashed into a single line sprinkled with literal \n and "magic line" comment blocks. This makes the embedded INI file unreadable for editing the configuration values so I have to go in and manually find-replace the formatting back how it was and re-indent the block.
Expected Behavior
Format-on-save should not mangle multiline strings. Newlines exist for a reason.
Current Behavior
Format-on-save mangles my strings.
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: