Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDEA-300186 add Japanese Hiragana and Katakana as full-width characters for Spock where table #2115

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ public static LeafBlockWrapper getFirstLeaf(@NotNull AbstractBlockWrapper block)
private static final Set<Character.UnicodeBlock> FULLWIDTH_BLOCKS =
Set.of(Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS,
Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS);
Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS,
Character.UnicodeBlock.HIRAGANA,
Character.UnicodeBlock.KATAKANA);

public static boolean isFullwidthCharacter(int codePoint) {
if (!Character.isValidCodePoint(codePoint)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ class HelloSpockSpec extends spock.lang.Specification {
"杰克瑞奇" | 5
"杰克瑞奇" | 4
"理查德" | 6
"あいう" | 3
"アイウ" | 3
"アイウエオ" | 5
}
}
-----
Expand All @@ -19,5 +22,8 @@ class HelloSpockSpec extends spock.lang.Specification {
"杰克瑞奇" | 5
"杰克瑞奇" | 4
"理查德" | 6
"あいう" | 3
"アイウ" | 3
"アイウエオ" | 5
}
}