mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #641] MD038 suggested fixes do not render well on GitHub. Or, I misunderstand their purpose. #486
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#486
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 @Ben-Voris on GitHub (Nov 17, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/641
What I want is a block of text that my user's can copy from a markdown file that includes a trailing space. E.g., something like
"
prefix -"The double quotes are to show what I want and to show that GitHub markdown renders the trailing space.
Specifically, this from MD038 - Spaces inside code span elements
The first example displays the a backtick, the text, and a backtick:
The second displays a backtick, followed by a space, followed by the text:
Other than ignoring the warning, another workaround is
as shown here. But, at least on GitHub, that introduces a line break that I don't want.Finally, the markdown preview in VS Code 1.73.1 appears to render these the same as GitHub, itself.
@DavidAnson commented on GitHub (Nov 17, 2022):
MD038 exists to help authors avoid accidentally including a space on either edge of an inline code span. If you specifically want to include a space, you probably want to suppress this rule because its guidance does not apply.
@Ben-Voris commented on GitHub (Nov 18, 2022):
I thought the reason for the rule was that space would not render consistently. If that's not so, I don't understand the motivation.
@DavidAnson commented on GitHub (Nov 18, 2022):
Similar to MD037 and MD039, extra space on the edge of emphasis and links is usually unnecessary and probably not what the author intended. These rules call that out, but of course if that is being done intentionally, then it is perfectly appropriate to disable the rules for that line, file, or project.
@DavidAnson commented on GitHub (Nov 18, 2022):
As the "rationale" for each rule indicates, having spaces present can lead to rendering problems in some cases. In others, it is just potentially unsightly.
@Ben-Voris commented on GitHub (Nov 18, 2022):
Thank you for the explanation.
Others might be as confused as I as to the purpose of the examples, so adding a few words about that might help.
For some reason Github does not show the close button to me. If you choose to close this, please would you do that?
@DavidAnson commented on GitHub (Nov 18, 2022):
I'll add a bit to the role description to try to explain this. Thanks.