test: add cases for fragments checking

This commit is contained in:
2024-01-12 00:33:05 +01:00
parent 68f35ddc0b
commit 0479652ffe
25 changed files with 183 additions and 98 deletions
+3
View File
@@ -0,0 +1,3 @@
# Awesome
<div id>Content</div>
@@ -0,0 +1,3 @@
# Invalid
[Link fragment](./awesome.md#)
@@ -0,0 +1,3 @@
# Invalid
![Image](../image.png#)
@@ -0,0 +1,3 @@
# Invalid
![Image](../image.png#non-existing-fragment)
@@ -0,0 +1,3 @@
# Awesome
<input name="name-should-be-ignored" id="id-after-name" />
@@ -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>
@@ -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>
@@ -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
@@ -1,5 +1,3 @@
# Invalid
[Link fragment](./awesome.md#non-existing-heading)
[Link fragment](./awesome.md#non-existing-heading-anchor)