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 11// LICENSE : MIT
22"use strict" ;
33export 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 ] ) / ;
68export const hiraganaRegExp = / [ ぁ - ん ] / ;
79export const karakanaRegExp = / [ ァ - ヶ ] / ;
810// 半角カタカナ
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import rule from "../src/2.1.2";
55var tester = new TextLintTester ( ) ;
66tester . run ( "2.1.2.漢字" , rule , {
77 valid : [
8- "今日は日本語の勉強をします。"
8+ "今日は日本語の勉強をします。" ,
9+ "度々問題が起きる。"
910 ] ,
1011 invalid : [
1112 {
You can’t perform that action at this time.
0 commit comments