mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Update MD037/no-space-in-emphasis to ignore emphasis markers in code spans (fixes #278).
This commit is contained in:
parent
bdc0246b34
commit
f5a71521d4
5 changed files with 195 additions and 76 deletions
|
|
@ -73,3 +73,50 @@ emphasis _ text {MD037}
|
|||
|
||||
Text ** bold {MD037}
|
||||
bold ** text {MD037}
|
||||
|
||||
Emphasis `inside
|
||||
of * code *
|
||||
blocks` is okay.
|
||||
|
||||
Emphasis `* inside`
|
||||
code
|
||||
`blocks *` is okay.
|
||||
|
||||
Emphasis `inside *`
|
||||
code
|
||||
`* blocks` is okay.
|
||||
|
||||
Emphasis `inside
|
||||
_ code _
|
||||
blocks` is okay.
|
||||
|
||||
Emphasis `_ inside`
|
||||
code
|
||||
`blocks _` is okay.
|
||||
|
||||
Emphasis `inside _`
|
||||
code
|
||||
`_ blocks` is okay.
|
||||
|
||||
Mixed `code_span`
|
||||
scenarios
|
||||
are _also_ okay.
|
||||
|
||||
Mixed `code*span`
|
||||
scenarios
|
||||
are *also* okay.
|
||||
|
||||
This paragraph
|
||||
contains *a* mix
|
||||
of `*` emphasis
|
||||
scenarios and *should*
|
||||
not trigger `*` any
|
||||
violations at *all*.
|
||||
|
||||
This paragraph
|
||||
contains `a * slightly
|
||||
more complicated
|
||||
multi-line emphasis
|
||||
scenario * that
|
||||
should * not trigger
|
||||
violations * either`.
|
||||
|
|
|
|||
|
|
@ -154,3 +154,23 @@ Text *emph***strong ** text {MD037}
|
|||
```markdown
|
||||
Violations * are * allowed in code blocks where emphasis does not apply.
|
||||
```
|
||||
|
||||
Emphasis `inside * code * blocks` is okay.
|
||||
|
||||
Emphasis `* inside` code `blocks *` is okay.
|
||||
|
||||
Emphasis `inside *` code `* blocks` is okay.
|
||||
|
||||
Emphasis `inside _ code _ blocks` is okay.
|
||||
|
||||
Emphasis `_ inside` code `blocks _` is okay.
|
||||
|
||||
Emphasis `inside _` code `_ blocks` is okay.
|
||||
|
||||
Mixed `code_span` scenarios are _also_ okay.
|
||||
|
||||
Mixed `code*span` scenarios are *also* okay.
|
||||
|
||||
Mixed `code*span` scenarios are _also_ okay.
|
||||
|
||||
Mixed `code_span` scenarios are *also* okay.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue