Generate Rules.md and md###.md files from metadata, improve Parameters documentation by referencing schema.

This commit is contained in:
David Anson 2022-10-29 23:21:45 -07:00
parent 32c75ebfd9
commit 37baddcf27
110 changed files with 3875 additions and 179 deletions

35
doc/md051.md Normal file
View file

@ -0,0 +1,35 @@
# MD051 - Link fragments should be valid
Tags: links
Aliases: link-fragments
This rule is triggered when a link fragment does not correspond to a heading
in the document:
```markdown
# Title
[Link](#fragment)
```
To fix the issue, change the fragment to reference an existing heading:
```markdown
[Link](#title)
```
Alternatively, an HTML `a` tag with an `id` (or a `name`) attribute defines a
valid anchor:
```markdown
<a id="fragment"></a>
```
Some platforms (e.g., [GitHub][github-section-links]) automatically create HTML
anchors for every heading. This makes it easy to link to different sections in
a document. These internal links can break over time as headings are renamed.
Note: Creating anchors for headings is not part of the CommonMark specification.
[github-section-links]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#section-links