File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
// LICENSE : MIT
2
2
"use strict" ;
3
3
export const japaneseRegExp = / (?: [ 々 〇 〻 \u3400 - \u4DBF \u4E00 - \u9FFF \uF900 - \uFAFF ] | [ \uD840 - \uD87F ] [ \uDC00 - \uDFFF ] | [ ぁ - ん ァ - ヶ ] ) / ;
4
- // http://tama-san.com/kanji-regex/
5
- export const kanjiRegExp = / (?: [ 々 〇 〻 \u3400 - \u9FFF \uF900 - \uFAFF ] | [ \uD840 - \uD87F ] [ \uDC00 - \uDFFF ] ) / ;
4
+ // http://tama-san.com/kanji-regex/ ベース
5
+ // "々" は 記号であるため除外
6
+ // https://github.com/azu/textlint-rule-preset-JTF-style/issues/48
7
+ export const kanjiRegExp = / (?: [ 〇 〻 \u3400 - \u9FFF \uF900 - \uFAFF ] | [ \uD840 - \uD87F ] [ \uDC00 - \uDFFF ] ) / ;
6
8
export const hiraganaRegExp = / [ ぁ - ん ] / ;
7
9
export const karakanaRegExp = / [ ァ - ヶ ] / ;
8
10
// 半角カタカナ
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import rule from "../src/2.1.2";
5
5
var tester = new TextLintTester ( ) ;
6
6
tester . run ( "2.1.2.漢字" , rule , {
7
7
valid : [
8
- "今日は日本語の勉強をします。"
8
+ "今日は日本語の勉強をします。" ,
9
+ "度々問題が起きる。"
9
10
] ,
10
11
invalid : [
11
12
{
You can’t perform that action at this time.
0 commit comments