bug: fix body-maker filters ordering #8
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a bug in body-maker module which removes the leading-empty-line from the commit body message when commitlint's
body-leading-blankoption is set toalways. Previously, theleadingBlankFilterfilter function works fine and it prepends the commit body with an empty new line correctly. But, when its output - which is the empty-line-prepended commit body, gets passed intomaxLineLengthFilterfunction, it removes the leading empty line (\n) that was prepended byleadingBlankFilteras it is using theword-wrappackage. Finally, the output of this chain, does not have the leading-empty-new-line which is required for commitlint, and it throws an error on regarding this. Also, as leading empty new line characters does not affect maximum length of any line, there should not be any problem to apply leading empty new line after splitting body message into multiple line, if necessary.This merge request fixes this issue.