Reimplement inlineCodeSpanRanges as codeBlockAndSpanRanges to fix an issue with unterminated code spans (and for flexibility).

This commit is contained in:
David Anson 2021-11-23 04:40:05 +00:00 committed by GitHub
parent 9c60343692
commit 1e82f76596
12 changed files with 178 additions and 71 deletions

View 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
} -->

View file

@ -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}

View file

@ -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",

View file

@ -2,7 +2,7 @@
|Pattern|Description|
|-------------|-----------------|
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|...|
|`(?:\["'\](?<1>\[^"'\]*)["']|(?<1>\S+))`|{MD011}|
|Pattern|Description|
|-------------|-----------------|