2.4.2 • Published 2 years ago
textlint-rule-ja-space-around-code v2.4.2
textlint-rule-ja-space-around-code 
インラインコードの周りをスペースで囲むかどうかを決めるtextlintルール
インラインコードとはTxtASTのCode nodeのことです。
このルールでは、インラインコードの前後が日本語である場合に半角スペースを入れるかを決定します。 オプションでスペースの有無を決定できます。
`code` と日本語の間はスペースを空ける
`code`と日本語の間はスペースを空けないInstall
Install with npm:
npm install textlint-rule-ja-space-around-codeUsage
Via .textlintrc(Recommended)
{
"rules": {
"ja-space-around-code": true
}
}Via CLI
textlint --rule ja-space-around-code README.mdOptions
before:boolean- デフォルト:
false trueなら、Codeの前に半角スペースを入れる
- デフォルト:
after:boolean- デフォルト:
false trueなら、Codeの後に半角スペースを入れる
- デフォルト:
デフォルト値は次のようになります。
{
"rules": {
"ja-space-around-code": {
"before": false,
"after": false
}
}
}Fixable
textlint --fixの自動修正に対応しています。
Changelog
See Releases page.
Running tests
Install devDependencies and Run npm test:
npm i -d && npm testContributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Author
License
MIT © azu