mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #329] MD044: Names match in links with URL-encoded spacing #283
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lxp on GitHub (Sep 14, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/329
I use markdownlint version 0.20.4 with the following configuration for MD044:
My problem is that MD044 also matches certain URLs.
Example 1, which fails with
Proper names should have the correct capitalization [Expected: PDF; Actual: pdf]:<https://www.example.org/test%20test.pdf>Example 2, which passes without any error (the expected behavior):
<https://www.example.org/testtest.pdf>The problem seems to be URL-encoded spacing (at least
%20and%0aseem to fail).@DavidAnson commented on GitHub (Sep 14, 2020):
It seems to report both cases to me, see below. It does NOT seem to report a similar case with normal link syntax, so the improvement here may be to exclude the angle bracket link syntax you use.
https://dlaa.me/markdownlint/#%25m%23%20Issue%20329%0A%0AExample%201%2C%20which%20fails%20with%20Proper%20names%20should%20have%20the%20correct%20capitalization%20%5BExpected%3A%20PDF%3B%20Actual%3A%20pdf%5D%3A%0A%3Chttps%3A%2F%2Fwww.example.org%2Ftest%2520test.pdf%3E%0A%0AExample%202%2C%20which%20passes%20without%20any%20error%20(the%20expected%20behavior)%3A%0A%3Chttps%3A%2F%2Fwww.example.org%2Ftesttest.pdf%3E%0A%0A%5BExample%203%5D(https%3A%2F%2Fwww.example.org%2Ftesttest.pdf)%0A%0A%3C!--%20markdownlint-configure-file%20%7B%0A%20%20%22proper-names%22%3A%20%7B%0A%20%20%20%20%22names%22%3A%20%5B%0A%20%20%20%20%20%20%22PDF%22%0A%20%20%20%20%5D%2C%0A%20%20%20%20%22code_blocks%22%3A%20false%0A%20%20%7D%0A%7D%0A--%3E%0A
@lxp commented on GitHub (Sep 15, 2020):
It is the same in your example. If you look closely, an error is reported for line 3 (error text) and 4 (angle bracket link with spacing), but not for line 7 (angle bracket link without spacing) and 9 (other link syntax without spacing). Line 3 is reported because of the error text
[Expected: PDF; Actual: pdf]also contains pdf in lower case.@DavidAnson commented on GitHub (Sep 15, 2020):
Yes, thanks, I read the 4 as a 7 the first time, somehow!
@lxp commented on GitHub (Sep 25, 2020):
Thanks! The fix works for me.