diff --git a/README.md b/README.md index 242ba45..b0b137e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ textlint rule that check unmatched pairs like `(` and `]` - 角括弧[]: `[` and `]` - 重角括弧〚〛: `〚` and `〛` - 隅付き括弧【】: `【` and `】` +- double guillemet: `«` and `»` +- single guillemet: `‹` and `›` ## Examples diff --git a/src/parser/PairMaker.js b/src/parser/PairMaker.js index e3c26e3..720d264 100644 --- a/src/parser/PairMaker.js +++ b/src/parser/PairMaker.js @@ -66,6 +66,16 @@ const PAIR_MARKS = [ key: "隅付き括弧【】", start: `【`, end: `】` + }, + { + key: "double guillemet «»", + start: "«", + end: "»" + }, + { + key: "single guillemet ‹›", + start: "‹", + end: "›" } ]; diff --git a/test/textlint-rule-no-unmatched-pair-test.js b/test/textlint-rule-no-unmatched-pair-test.js index 135a622..7f6f045 100644 --- a/test/textlint-rule-no-unmatched-pair-test.js +++ b/test/textlint-rule-no-unmatched-pair-test.js @@ -37,7 +37,9 @@ tester.run("textlint-rule-no-unmatched-pair", rule, { // GitHub Flavored Markdown // https://github.com/orgs/community/discussions/16925 `> [!NOTE] -> some content` +> some content`, + `Paul a dit : « Je viendrai demain » .`, + `Elle a écrit: « L’article est intitulé ‹ La technologie aujourd’hui › » .` ], invalid: [ { @@ -95,6 +97,24 @@ This pair mark is called double quote.` column: 105 } ] + }, + { + text: `Paul a dit : « Je viendrai demain.`, + errors: [ + { + line: 1, + column: 15 + } + ] + }, + { + text: `Elle a écrit: « L’article est intitulé ‹ La technologie aujourd’hui » .`, + errors: [ + { + line: 1, + column: 41 + } + ] } ] });