mirror of
https://github.com/theoludwig/markdownlint-rule-relative-links.git
synced 2025-05-27 11:37:24 +02:00
test: add cases for fragments checking
This commit is contained in:
3
test/fixtures/invalid/empty-id-fragment/awesome.md
vendored
Normal file
3
test/fixtures/invalid/empty-id-fragment/awesome.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div id>Content</div>
|
3
test/fixtures/invalid/empty-id-fragment/empty-id-fragment.md
vendored
Normal file
3
test/fixtures/invalid/empty-id-fragment/empty-id-fragment.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#)
|
3
test/fixtures/invalid/ignore-empty-fragment-checking-for-image.md
vendored
Normal file
3
test/fixtures/invalid/ignore-empty-fragment-checking-for-image.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||

|
3
test/fixtures/invalid/ignore-fragment-checking-for-image.md
vendored
Normal file
3
test/fixtures/invalid/ignore-fragment-checking-for-image.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||

|
3
test/fixtures/invalid/ignore-name-fragment-if-not-an-anchor/awesome.md
vendored
Normal file
3
test/fixtures/invalid/ignore-name-fragment-if-not-an-anchor/awesome.md
vendored
Normal file
@ -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)
|
3
test/fixtures/invalid/ignore-not-an-id-fragment/awesome.md
vendored
Normal file
3
test/fixtures/invalid/ignore-not-an-id-fragment/awesome.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div data-id="not-an-id-should-be-ignored">Content</div>
|
3
test/fixtures/invalid/ignore-not-an-id-fragment/ignore-not-an-id-fragment.md
vendored
Normal file
3
test/fixtures/invalid/ignore-not-an-id-fragment/ignore-not-an-id-fragment.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Invalid](./awesome.md#not-an-id-should-be-ignored)
|
3
test/fixtures/invalid/non-existing-anchor-name-fragment/awesome.md
vendored
Normal file
3
test/fixtures/invalid/non-existing-anchor-name-fragment/awesome.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<a name="existing-heading-anchor">Link</a>
|
3
test/fixtures/invalid/non-existing-anchor-name-fragment/non-existing-anchor-name-fragment.md
vendored
Normal file
3
test/fixtures/invalid/non-existing-anchor-name-fragment/non-existing-anchor-name-fragment.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Invalid
|
||||
|
||||
[Link fragment](./awesome.md#non-existing-anchor-name-fragment)
|
3
test/fixtures/invalid/non-existing-element-id-fragment/awesome.md
vendored
Normal file
3
test/fixtures/invalid/non-existing-element-id-fragment/awesome.md
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Awesome
|
||||
|
||||
<div id="existing-element-id-fragment">Content</div>
|
3
test/fixtures/invalid/non-existing-element-id-fragment/non-existing-element-id-fragment.md
vendored
Normal file
3
test/fixtures/invalid/non-existing-element-id-fragment/non-existing-element-id-fragment.md
vendored
Normal file
@ -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)
|
||||
|
Reference in New Issue
Block a user