google / google/yamlfmt

Preserve at most X lines setting

Open
#166 0 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

I would like to be able to preserve two blank lines (any more than two blank lines should be reduced to two blank lines).

I suggest the following backwards compatible change:

* `retain_line_breaks` (bool) - Retains all line breaks
* `retain_line_breaks_single` (bool) - Retains at most one line break (takes precedence over `retain_line_breaks`)
* `retain_line_breaks_count` (int) - Retains at most this many line breaks (takes precedence over `retain_line_breaks` and `retain_line_breaks_single`)

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.