mirror of
https://github.com/theoludwig/markdownlint-rule-relative-links.git
synced 2026-03-14 21:27:17 +01:00
test: add cases for fragments checking
This commit is contained in:
|
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div id>Content</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||

|
||||
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||

|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<input name="name-should-be-ignored" id="id-after-name" />
|
||||
test/fixtures/invalid/ignore-name-fragment-if-not-an-anchor/ignore-name-fragment-if-not-an-anchor.md
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Invalid](./awesome.md#name-should-be-ignored)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div data-id="not-an-id-should-be-ignored">Content</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Invalid](./awesome.md#not-an-id-should-be-ignored)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<a name="existing-heading-anchor">Link</a>
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#non-existing-anchor-name-fragment)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div id="existing-element-id-fragment">Content</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#non-existing-element-id-fragment)
|
||||
@@ -1,5 +1,3 @@
|
||||
# Valid
|
||||
|
||||
<a name="existing-heading-anchor" ></a>
|
||||
# Awesome
|
||||
|
||||
## Existing Heading
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#non-existing-heading)
|
||||
|
||||
[Link fragment](./awesome.md#non-existing-heading-anchor)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<a name="existing-heading-anchor">Link</a>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#existing-heading-anchor)
|
||||
@@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div id="existing-element-id-fragment">Content</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#existing-element-id-fragment)
|
||||
@@ -1,7 +1,5 @@
|
||||
# Valid
|
||||
|
||||
<a name="existing-heading-anchor" ></a>
|
||||
|
||||
## Existing Heading
|
||||
|
||||
### Repeated Heading
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
[Link fragment](./awesome.md#existing-heading)
|
||||
|
||||
[Link fragment](./awesome.md#existing-heading-anchor)
|
||||
|
||||
[Link fragment Repeated 0](./awesome.md#repeated-heading)
|
||||
|
||||
[Link fragment Repeated 1](./awesome.md#repeated-heading-1)
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
# Valid
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Valid
|
||||
|
||||
<div id="existing-element-id-fragment">Content</div>
|
||||
|
||||
[Link fragment](#non-existing-element-id-fragment)
|
||||
Reference in New Issue
Block a user