google / google/yamlfmt

How to prevent escaped newlines from being used?

Open
#314 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
75
PR merge metrics
No merged PRs in 30d

Description

**Is there a way to force the formatted yaml to not have `\n` sequences in the strings?**

e.g.

Input:
```yaml
foo: "First line.\nSecond line.\n"
```

Desired output:
```yaml
foo: |
First line.
Second line.

```

The content of the string itself has not changed, if I am not mistaken.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.