Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
こんにちは。
textlint-rule-prhでは、
checkHeader
オプションで、「特定のnodeにはprhルールを適用しない」ができます。自分は、「特定のnodeにだけprhルールを適用したい」という、逆のことがしたいです。
具体的には、header要素に対してだけprhルールを適用したいです。
たとえば、見出しで手順を示す際に、
数字.
の後に必ずスペースを入れるといった運用を考えています。## 1. ログインします
checkHeader
オプションと同様に、子にStrを持つうるnodeに対しcheckオプションがあると解決できるのでは?と思っています(例:checkParagrah
)デフォルトで
true
にすると、既存への影響もないだろうと考えます。このような変更を入れる可能性はありますでしょうか?
Hi there,
In textlint-rule-prh, the checkHeader option allows us to exclude specific nodes from prh rule checks.
What I’d like to do is the opposite: I want to apply prh rules only to specific nodes.
Specifically, I want to apply the prh rule only to heading elements.
For example, I’m considering enforcing a rule like “always insert a space after a number followed by a period” when writing steps in headings, such as:
## 1. Log in
I was wondering if we could have a check option for other node types (e.g., checkParagraph) similar to checkHeader, which would allow us to apply rules selectively to nodes that can contain Str children.
If the default value is true, I guess this would not introduce any breaking changes.
Do you think it would be possible to add support for something like this?
Beta Was this translation helpful? Give feedback.
All reactions