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
Incorrectly fixes URLS #73
Comments
The two examples are getting formatted by GitHub and look the same to me. Could you please put them in a code fence or indent them so they don’t get formatted? Thank you! |
I’m working on some improvements to this rule as part of a change to the core project right now. That may help. I will try to reproduce your problem specifically. If you have a link to a file or repository to test with, that would save me some typing! |
The detection of a bare link seems to be due to Creole link syntax being unrecognized. Here is an example: https://dlaa.me/markdownlint/#%25m%23%20Issue%2073%0A%0AThis%20is%20a%20%5B%5Bhttps%3A%2F%2Fen.m.wikipedia.org%2Fwiki%2FCreole_(markup)%7CCreole%5D%5D%20link. That’s not something I will change because it’s correctly detecting a bare link in Markdown. However, the confusing thing is that the highlighting is wrong. That is something I’m hoping to improve! @gedw99, is this the same scenario you have? |
But it detects bare link at the fixed one (detects it as wrong even after I fixed it) and it does not detect the next incorrect ones, it may cached or something. |
Rules only fire once per line, reporting the first problem they find. There is a bare link (Creole style) at the end of the line in the example in your image above and the rule is correctly identifying a problem on that line but INcorrectly highlighting the first link on that line. (At least that’s what it looks like from my phone on the bus.) If you have more examples, please share and I will review them all this evening. |
I found how to capture the Markdown of the original issue. This:
Becomes:
|
The problem with the original issue is that it is not a valid Markdown link due to the space between the text and URL: https://dlaa.me/markdownlint/#%25m%23%20Issue%2073%0A%0A-%20A%20%5BRDF%20triple%20store%5D%20(https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTriplestore)%20based%20storage%20to%20provide%20a%20dynamically%20expanding%20ontology%20for%20the%20many%20types. The “auto fix” for that isn’t ideal, but it isn’t clearly wrong, either. What would have been more helpful would be a new rule to detect the invalid link syntax. I’ve made a note to look into that some day. |
@CornyjK, your issue should be addressed once DavidAnson/markdownlint#181 makes it into a |
Closing issue as the original behavior seems to have been basically by design and detecting that flavor of invalid link may be handled by a future rule. |
i have this:
Ontology
It says finds that i have Bare URLS. See: https://github.com/DavidAnson/markdownlint/blob/v0.13.0/doc/Rules.md#md034
But when i ask it to fix it i get this (NOTE where it puts the ">" !)
Ontology
The text was updated successfully, but these errors were encountered: