MD038 suggested fixes do not render well on GitHub. Or, I misunderstand their purpose.
See original GitHub issueWhat 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
Note: A single leading and trailing space is allowed by the specification and automatically trimmed (to allow for embedded backticks):
`backticks`
Note: A single leading or trailing space is allowed if used to separate code span markers from an embedded backtick:
` embedded backtick
The first example displays the a backtick, the text, and a backtick:
`backticks`
The second displays a backtick, followed by a space, followed by the text:
` embedded backtick
Other than ignoring the warning, another workaround is
prefix -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.
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I’ll add a bit to the role description to try to explain this. Thanks.
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.