cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Is it possible to tweak `:remove-consecutive-blank-lines?` so that it accepts 3 or 2 blank lines instead of only 2?

Open pdelfino opened this issue 2 years ago • 1 comments

Hi,

Congrats on the awesome work! I am planning to use this plug-in on the project that I am working on at my job.

Currently, the documentation says that:

:remove-consecutive-blank-lines? - true if cljfmt should collapse consecutive blank lines. This will convert (foo)\n\n\n(bar) to (foo)\n\n(bar). Defaults to true.

Unfortunately, one of the developers like to use 3 blank lines to express a particular meaning.

Would it be possible to tweak the tool so that it accepts 2 or 3 blank lines instead of only 2?

Thank you!

pdelfino avatar Oct 25 '22 19:10 pdelfino

Possibly... I'm open to it being an option, but since this is the first time I've been asked about this to my recollection, this may be too niche a feature. Have you considered managing this with a separate regular expression? e.g. (str/replace s #"\n{4,}" "\n\n\n").

weavejester avatar Oct 25 '22 22:10 weavejester