Skip to content

textlint rule that limit max length of ruby-base and ruby-text.

License

Notifications You must be signed in to change notification settings

matori/textlint-rule-max-ruby-len

Repository files navigation

textlint-rule-max-ruby-len

ルビ親文字とルビ文字の文字数を制限するtextlintルールです。

対応しているルビ構文は次のとおりです。

|親文字《ルビ》
|親文字《ルビ》

インストール

npm install textlint-rule-max-ruby-len

使い方

// .textlintrc
{
  "rules": {
    "max-ruby-len": true,
  }
}

オプション

// .textlintrc
{
  "rules": {
    "max-ruby-len": {
      "rubyBase": 10,
      "rubyText": 10,
      "useStringLength": false
    },
  }
}
  • rubyBase: number
    default: 10
    ルビ親文字の最大文字数。
  • rubyText: number
    default: 10
    ルビ文字の最大文字数。
  • useStringLength: boolean
    default: false
    文字の数え方。
    初期状態ではString Iteratorを使い[...striing].lengthで数えます。
    string.lengthで数えたい場合にtrueを指定します。
    よくわからない場合は、お使いの投稿サイトで𩸽が2文字と判定されたらtrueにしておくとよいでしょう。

License

MIT

About

textlint rule that limit max length of ruby-base and ruby-text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published