File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
packages/textlint-rule-ja-space-around-code Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
インラインコードの周りをスペースで囲むかどうかを決めるtextlintルール
4
4
5
+ インラインコードとは[ TxtAST] ( https://github.com/textlint/textlint/blob/master/docs/txtnode.md " TxtAST ") の` Code ` nodeのことです。
6
+
7
+ このルールでは、インラインコードの前後が日本語である場合に半角スペースを入れるかを決定します。
8
+ オプションでスペースの有無を決定できます。
9
+
10
+ `code` と日本語の間はスペースを空ける
11
+ `code`と日本語の間はスペースを空けない
12
+
5
13
## Install
6
14
7
15
Install with [ npm] ( https://www.npmjs.com/ ) :
@@ -27,6 +35,28 @@ textlint --rule ja-space-around-code README.md
27
35
```
28
36
29
37
38
+ ## Options
39
+
40
+ - ` before ` : ` boolean `
41
+ - デフォルト: ` false `
42
+ - ` true ` なら、` Code ` の前に半角スペースを入れる
43
+ - ` after ` : ` boolean `
44
+ - デフォルト: ` false `
45
+ - ` true ` なら、` Code ` の後に半角スペースを入れる
46
+
47
+ デフォルト値は次のようになります。
48
+
49
+ ``` json
50
+ {
51
+ "rules" : {
52
+ "ja-space-around-code" : {
53
+ "before" : false ,
54
+ "after" : false
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
30
60
## Changelog
31
61
32
62
See [ Releases page] ( https://github.com/textlint-ja/textlint-rule-spacing/releases ) .
You can’t perform that action at this time.
0 commit comments