Skip to content

Commit 964e981

Browse files
committed
refactor: align JFlex and custom whitespace handling
1 parent fd7a761 commit 964e981

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ package com.github.lppedd.cc.parser;
5656
}
5757

5858
private boolean isWhitespace(final char ch) {
59-
return Character.isWhitespace(ch) || Character.isSpaceChar(ch);
59+
return Character.getType(ch) == Character.SPACE_SEPARATOR || ch == '\t';
6060
}
6161

6262
private CCToken token(final CCToken.Type type) {
@@ -72,7 +72,7 @@ package com.github.lppedd.cc.parser;
7272
%}
7373

7474
NL = \r\n | \r | \n
75-
WS = [^\S\r\n]
75+
WS = [\p{Zs}\t]
7676

7777
// We allow footer types with spaces inside
7878
FooterType = [^\s:][^:\r\n]*

0 commit comments

Comments
 (0)