Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

リンクについてtextlint-rule-prhの対象にならない #105

Closed
tetsuya-ki opened this issue Apr 11, 2024 · 2 comments
Closed

リンクについてtextlint-rule-prhの対象にならない #105

tetsuya-ki opened this issue Apr 11, 2024 · 2 comments
Labels
Type: Question Further information is requested

Comments

@tetsuya-ki
Copy link

事象

自分の環境では、[xxx](yyy)<yyy>のようなリンクについて、textlint-rule-prhの対象になりません。

checkLinkをtrueとして設定すればリンクも対象になるかと期待したのですが、対象にならないままでした。
こちらは仕様なのでしょうか? それとも環境(Apple M2)が悪いのでしょうか...。

image

たとえば、以下のようなリンクがある場合、textlint対象になって欲しいと思っています。

- [Title](Link) -> NG(NamedLink)

このように設定しました。

  - expected: NamedLink
    pattern:
      - /\[Title\]\(Link\)/

参考情報

checkEmphasis:true, checkHeader:falseは効いているため、checkLink:trueの設定箇所誤りではなさそうです。
https://github.com/textlint-rule/textlint-rule-prh/blob/master/README.md#options

環境

npx: 10.2.4
textlint: v14.0.4
Application: Visual Studio Code - Insiders
Version: 1.89.0-insider (Universal)
Commit: 903ce35c77c7b5714a2d9063b9f1d9bc2956d07c
Date: 2024-04-11T05:50:09.275Z (17 hrs ago)
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 21.6.0

@azu
Copy link
Member

azu commented Apr 12, 2024

[Title]
checkLinkはリンクのTitle部分だけを対象にしてるのでURL部分はマッチしないですね。
あくまで人間に表示されるのは、Title部分だけなのでprhではレンダリングして人に見える部分だけを対象にしてます。

@azu azu added the Type: Question Further information is requested label Apr 12, 2024
@tetsuya-ki
Copy link
Author

リンクのURLをlintできればいいなと思っていたのですが、
対象外ということで承知しました。

お忙しい中、ご回答ありがとうございました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants