-
Notifications
You must be signed in to change notification settings - Fork 11
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
checkRelative
is failing to validate relative links properly
#110
Comments
This result is expected behavior. Because this rule can not know the custom tramsform logic. If you want to resolve the path, We need to add some new feature. For example, add
If the option is above, this rule try to resolve
This approach is similar with ESLint's eslint-plugin-import. Do you think about it? |
I think that's a reasonable suggestion. At least this will allow users to validate "internal" links. Being same approach as ESLint is probably another plus point. I'm not too sure if this will able to properly validate links within a page (i.e. What's your thought on this? Some editors (i.e. Visual Studio Code) can directly go to those internal links (when you click on it) including the headers. |
I think that this rule will not be covered anchor link winth in a page. Currently, this rule just remove
I recommend that create another textlint rule for such validation. |
I suppose another rule can be created for anchor link validation. I was thinking that this same rule can be enhanced with configuration for validating anchor links. |
@azu Will you be open to accepting a PR, if I implement the anchor link validation within this rule? |
Interest, but it is hard that implement right behavior, I think. 📝Note: GFM create |
Yes, the header text linking in GFM is implicit and not defined in the specification. But I would argue that large markdown documents require anchor linking. It is practically very difficult to inter link documents without anchors, especially in large documentation base. Hence, even though this is not be part of the specification, I think it still might be one of the most used features of GFM. |
I use static site generator tool to build a static html site. My sources are all in Markdown file/format.
All of these examples below are valid but the textlint rule detects them as an error.
In each cases listed above, there would be a source file named
requirements.md
oroverview.md
. The static site generator will create arequirements.html
,overview.html
file once the site is built. However, it seems this textlint rule is not able to perform this validation on the input source which are markdown files.My only workaround is to set
checkRelative
tofalse
. I don't really like this option because obviously this means I can only validate external links. But, it's also possible that internal/relative links may be invalid too due to user error.The text was updated successfully, but these errors were encountered: