Skip to content

Config editor inlines & escapes multiline strings with two newlines #217

@jtmarmon

Description

@jtmarmon

What happened?

We have an ESC config with a YAML string in it. Typically the ESC editor preserves our formatting on save, but if we accidentally add an empty newline and save, pulumi collapses it into a single line. Would be great if the editor was a little more lenient on whitespace

Example

  • Create an ESC file with the following config and save
values:
  myConfig: |-
    a: 1
      a2: 2
    b: 2
    c: 3
  • Add a newline between any keys
  • Observe the string has collapsed into a oneline string like
values:
  myConfig: "a: 1\n  a2: 2 \n\nb: 2\nc: 3"

Output of pulumi about

n/a

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions