mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #489] MD038 edge case with internal backticks #401
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#401
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 @nschonni on GitHub (Jan 21, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/489
The following doesn't trigger, although it does have internal padding space
This is something that was just a bug in terminating the code fence and re-opening it again, but it should still flag the MD038 since both the code spans have MD038 issues
https://dlaa.me/markdownlint/#%25m%60%20HTMLMediaElement%60%60.src%20%60
@nschonni commented on GitHub (Jan 22, 2022):
Found some more of the odd ones searching over in mdn/content with this regex:
@nschonni commented on GitHub (Jan 22, 2022):
Actually, I'm thinking this might not be fixable, since I think the padding is actually according to CommonMark with this edge case, but unintentionally incorrect from their HTML -> MD migration
@nschonni commented on GitHub (Jan 22, 2022):
Here are the ones I picked up in that repo https://github.com/mdn/content/pull/12325
@DavidAnson commented on GitHub (Jan 22, 2022):
Like you said, CommonMark allows codes spans to have a single space at the beginning and end (and will remove both) in order to allow code that begins or ends with a backtick (though the code isn't required to do so). Your example above meets this criteria, but I can't tell from here if that's a bad conversion or deliberate.
https://spec.commonmark.org/0.30/#code-spans
@nschonni commented on GitHub (Jan 22, 2022):
Yeah, looks like this is a case of https://spec.commonmark.org/0.30/#example-340
I think there were a few deliberate ones in the conversion and a few mistakes, but I don't think Markdownlint can actually tell the difference since they are valid in those examples