Skip to content

Commit 0d9acc3

Browse files
committed
docs(textlint-rule-ja-space-around-code): オプションについてを追加
1 parent fbc4b0f commit 0d9acc3

File tree

1 file changed

+30
-0
lines changed
  • packages/textlint-rule-ja-space-around-code

1 file changed

+30
-0
lines changed

packages/textlint-rule-ja-space-around-code/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
インラインコードの周りをスペースで囲むかどうかを決めるtextlintルール
44

5+
インラインコードとは[TxtAST](https://github.com/textlint/textlint/blob/master/docs/txtnode.md "TxtAST")`Code` nodeのことです。
6+
7+
このルールでは、インラインコードの前後が日本語である場合に半角スペースを入れるかを決定します。
8+
オプションでスペースの有無を決定できます。
9+
10+
`code` と日本語の間はスペースを空ける
11+
`code`と日本語の間はスペースを空けない
12+
513
## Install
614

715
Install with [npm](https://www.npmjs.com/):
@@ -27,6 +35,28 @@ textlint --rule ja-space-around-code README.md
2735
```
2836

2937

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+
3060
## Changelog
3161

3262
See [Releases page](https://github.com/textlint-ja/textlint-rule-spacing/releases).

0 commit comments

Comments
 (0)