Skip to content

Commit 888eb2b

Browse files
committed
fix(rule): checkFootnoteのオプション値の意味が逆になっていたのを修正
checkFootnoteの:false(デフォルト)でチェックが有効になっていた
1 parent 561a418 commit 888eb2b

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

src/textlint-rule-ja-no-mixed-period.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const reporter = (context, options = {}) => {
5555
Syntax.Image,
5656
Syntax.BlockQuote,
5757
Syntax.Emphasis
58-
].concat(checkFootnote ? FootnoteNodes : []);
58+
].concat(checkFootnote ? [] : FootnoteNodes);
5959
return {
6060
[Syntax.Paragraph](node) {
6161
if (helper.isChildNode(node, ignoredNodeTypes)) {

test/textlint-rule-ja-no-mixed-period-test.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tester.run(
1717
ruleId: "ja-no-mixed-period",
1818
rule: rule,
1919
options: {
20-
checkFootnote: true
20+
checkFootnote: false
2121
}
2222
}
2323
]
@@ -27,8 +27,39 @@ tester.run(
2727
{
2828
text: `//footnote[test][脚注はデフォルトで無視される]`,
2929
ext: ".re"
30+
},
31+
{
32+
text: `= はじめてのRe:VIEW
33+
34+
「Hello, Re:VIEW.」
35+
36+
== Re:VIEWとは
37+
38+
@<b>{Re:VIEW}は、EWBやRDあるいはWikiに似た簡易フォーマットで記述したテキストファイルを、目的に応じて各種の形式に変換するツールセットです。
39+
40+
平易な文法ながらも、コンピュータ関係のドキュメント作成のための多くの機能を備えており、次のような形式に変換できます。
41+
42+
* テキスト(指示タグ付き)
43+
* LaTeX
44+
* HTML
45+
* XML
46+
47+
@<fn>{fuga}
48+
49+
現在入手手段としては次の3つがあります。
50+
51+
1. Ruby gem
52+
2. Git
53+
3. Download from GitHub
54+
55+
ホームページは@<tt>{https://reviewml.org/}です。
56+
57+
//footnote[fuga][ふがー]
58+
`,
59+
ext: ".re"
3060
}
31-
]
61+
62+
],
3263
}
3364
);
3465

0 commit comments

Comments
 (0)