mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD051/link-fragments to add ignore_case parameter and improve documentation (fixes #1274).
This commit is contained in:
parent
74aa96d19d
commit
04c693b00b
16 changed files with 315 additions and 44 deletions
|
@ -16,9 +16,9 @@ generated name (see below):
|
|||
[Link](#heading-name)
|
||||
```
|
||||
|
||||
Link fragments may be handled case-sensitively, so this rule requires fragments
|
||||
to exactly match the [GitHub heading algorithm][github-heading-algorithm].
|
||||
Therefore, the following example is reported as a violation:
|
||||
For consistency, this rule requires fragments to exactly match the [GitHub
|
||||
heading algorithm][github-heading-algorithm] which converts letters to
|
||||
lowercase. Therefore, the following example is reported as a violation:
|
||||
|
||||
```markdown
|
||||
# Heading Name
|
||||
|
@ -26,6 +26,10 @@ Therefore, the following example is reported as a violation:
|
|||
[Link](#Heading-Name)
|
||||
```
|
||||
|
||||
To ignore case when comparing fragments with heading names, the `ignore_case`
|
||||
parameter can be set to `true`. In this configuration, the previous example is
|
||||
not reported as a violation.
|
||||
|
||||
Alternatively, some platforms allow the syntax `{#named-anchor}` to be used
|
||||
within a heading to provide a specific name (consisting of only lower-case
|
||||
letters, numbers, `-`, and `_`):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue