Skip to content

Commit 3df4286

Browse files
committed
refactor: avoid parsing trailing newlines as part of the body
1 parent 628d23c commit 3df4286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/github/lppedd/cc/parser/strictConventionalCommit.flex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ FooterType = [^\s:][^:\r\n]*
155155

156156
<BODY> {
157157
// Body until a footer starts (footer is NOT consumed)
158-
[^] / {NL}({FooterType}: | {FooterType}{WS}#) {
158+
[^] / {NL}+({FooterType}: | {FooterType}{WS}#) {
159159
appendText(yytext());
160160
yybegin(FOOTERS);
161161
return token(CCToken.Type.BODY, getTextAndReset());

0 commit comments

Comments
 (0)