mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-02-18 19:28:05 +01:00
Reimplement inlineCodeSpanRanges as codeBlockAndSpanRanges to fix an issue with unterminated code spans (and for flexibility).
This commit is contained in:
parent
9c60343692
commit
1e82f76596
12 changed files with 178 additions and 71 deletions
38
test/code-blocks-and-spans.md
Normal file
38
test/code-blocks-and-spans.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Code Blocks and Spans {MD044}
|
||||
|
||||
Text CODE text {MD044}
|
||||
|
||||
Text `CODE` text
|
||||
|
||||
```lang
|
||||
CODE
|
||||
|
||||
CODE
|
||||
```
|
||||
|
||||
`CODE` text `CODE`
|
||||
|
||||
CODE
|
||||
|
||||
CODE
|
||||
|
||||
Text `CODE
|
||||
CODE` text
|
||||
text text
|
||||
text `CODE
|
||||
CODE CODE
|
||||
CODE` text
|
||||
|
||||
Text `CODE {MD044}
|
||||
|
||||
Text `CODE {MD044}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"proper-names": {
|
||||
"names": [
|
||||
"code"
|
||||
],
|
||||
"code_blocks": false
|
||||
},
|
||||
"code-block-style": false
|
||||
} -->
|
||||
|
|
@ -96,3 +96,25 @@ Text **\<base directory>\another\directory\\<slash/directory>** text
|
|||
<a href="https://example.com" target="_blank">Google</a> {MD033}
|
||||
|
||||
<a href="https://example.com:9999" target="_blank">Google</a> {MD033}
|
||||
|
||||
## Unterminated code span followed by element in code span
|
||||
|
||||
Text text `text text
|
||||
|
||||
Text `<element>` text
|
||||
|
||||
Text
|
||||
text `text
|
||||
text
|
||||
|
||||
Text `code <element> code` text
|
||||
|
||||
```lang
|
||||
code {MD046:112}
|
||||
|
||||
<element>
|
||||
```
|
||||
|
||||
Text `code <element> code` text
|
||||
|
||||
Text <element> text {MD033}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ if (existsSync(dotnetDocsDir)) {
|
|||
"docs/core/dependency-loading/collect-details.md",
|
||||
"docs/core/deploying/single-file.md",
|
||||
"docs/core/deploying/trimming/trimming-options.md",
|
||||
"docs/core/diagnostics/dotnet-dump.md",
|
||||
"docs/core/extensions/cloud-service.md",
|
||||
"docs/core/extensions/configuration-providers.md",
|
||||
"docs/core/extensions/console-log-formatter.md",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|Pattern|Description|
|
||||
|-------------|-----------------|
|
||||
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|...|
|
||||
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|{MD011}|
|
||||
|
||||
|Pattern|Description|
|
||||
|-------------|-----------------|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue