Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAnson committed Feb 7, 2025
1 parent c83327c commit cbc3bc4
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 27 deletions.
31 changes: 22 additions & 9 deletions doc-build/md038.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
This rule is triggered for code spans that have content with spaces next to the
beginning or ending backticks:
This rule is triggered for code spans that have content with unnecessary spaces
next to the beginning or ending backticks:

```markdown
`some text `

` some text`

` some text `
```

To fix this, remove any spaces at the beginning or ending:
To fix this, remove extra spaces from the beginning or ending:

```markdown
`some text`
```

Note: Code spans containing only spaces are allowed by the specification:
Note: Code spans containing only spaces are allowed by the specification and are
preserved:

```markdown
` ` or ` `
` `

` `
```

Note: A single leading *and* trailing space is allowed by the specification and
automatically trimmed by the parser (in order to allow for code spans that embed
one or more backticks):
trimmed by the parser to support code spans that begin or end with a backtick:

```markdown
`` `backticks` ``

`` backtick` ``
```

Note: When single-space padding is present in the input, it will be preserved
even if unnecessary:

```markdown
`` `backticks` `` or `` backtick` ``
` code `
```

Rationale: Violations of this rule are usually unintentional and may lead to
Rationale: Violations of this rule are usually unintentional and can lead to
improperly-rendered content.
31 changes: 22 additions & 9 deletions doc/Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -1528,36 +1528,49 @@ Aliases: `no-space-in-code`

Fixable: Some violations can be fixed by tooling

This rule is triggered for code spans that have content with spaces next to the
beginning or ending backticks:
This rule is triggered for code spans that have content with unnecessary spaces
next to the beginning or ending backticks:

```markdown
`some text `

` some text`

` some text `
```

To fix this, remove any spaces at the beginning or ending:
To fix this, remove extra spaces from the beginning or ending:

```markdown
`some text`
```

Note: Code spans containing only spaces are allowed by the specification:
Note: Code spans containing only spaces are allowed by the specification and are
preserved:

```markdown
` ` or ` `
` `

` `
```

Note: A single leading *and* trailing space is allowed by the specification and
automatically trimmed by the parser (in order to allow for code spans that embed
one or more backticks):
trimmed by the parser to support code spans that begin or end with a backtick:

```markdown
`` `backticks` ``

`` backtick` ``
```

Note: When single-space padding is present in the input, it will be preserved
even if unnecessary:

```markdown
`` `backticks` `` or `` backtick` ``
` code `
```

Rationale: Violations of this rule are usually unintentional and may lead to
Rationale: Violations of this rule are usually unintentional and can lead to
improperly-rendered content.

<a name="md039"></a>
Expand Down
31 changes: 22 additions & 9 deletions doc/md038.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,47 @@ Aliases: `no-space-in-code`

Fixable: Some violations can be fixed by tooling

This rule is triggered for code spans that have content with spaces next to the
beginning or ending backticks:
This rule is triggered for code spans that have content with unnecessary spaces
next to the beginning or ending backticks:

```markdown
`some text `

` some text`

` some text `
```

To fix this, remove any spaces at the beginning or ending:
To fix this, remove extra spaces from the beginning or ending:

```markdown
`some text`
```

Note: Code spans containing only spaces are allowed by the specification:
Note: Code spans containing only spaces are allowed by the specification and are
preserved:

```markdown
` ` or ` `
` `

` `
```

Note: A single leading *and* trailing space is allowed by the specification and
automatically trimmed by the parser (in order to allow for code spans that embed
one or more backticks):
trimmed by the parser to support code spans that begin or end with a backtick:

```markdown
`` `backticks` ``

`` backtick` ``
```

Note: When single-space padding is present in the input, it will be preserved
even if unnecessary:

```markdown
`` `backticks` `` or `` backtick` ``
` code `
```

Rationale: Violations of this rule are usually unintentional and may lead to
Rationale: Violations of this rule are usually unintentional and can lead to
improperly-rendered content.

0 comments on commit cbc3bc4

Please sign in to comment.