mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update MD038/no-space-in-code to allow the "single leading and trailing space" scenario (fixes #271).
This commit is contained in:
parent
6ce426cf88
commit
65b19b703b
8 changed files with 102 additions and 79 deletions
13
doc/Rules.md
13
doc/Rules.md
|
|
@ -1401,23 +1401,28 @@ Tags: whitespace, code
|
|||
|
||||
Aliases: no-space-in-code
|
||||
|
||||
This rule is triggered on code span elements that have spaces right inside the
|
||||
This rule is triggered for code span elements that have spaces adjacent to the
|
||||
backticks:
|
||||
|
||||
```markdown
|
||||
` some text `
|
||||
|
||||
`some text `
|
||||
|
||||
` some text`
|
||||
```
|
||||
|
||||
To fix this, remove the spaces inside the codespan markers:
|
||||
To fix this, remove any spaces adjacent to the backticks:
|
||||
|
||||
```markdown
|
||||
`some text`
|
||||
```
|
||||
|
||||
Note: A single leading and trailing space is allowed by the specification and
|
||||
automatically trimmed (to allow for embedded backticks):
|
||||
|
||||
```markdown
|
||||
`` `backticks` ``
|
||||
```
|
||||
|
||||
Note: A single leading or trailing space is allowed if used to separate codespan
|
||||
markers from an embedded backtick:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue