-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce fragment checking for links to markdown files. (#1126)
- Implemented enhancements to include fragments in file links - Checked links to markdown files with fragments, generating unique kebab case and heading attributes. - Made code more idiomatic and added an integration test. - Updated documentation. - Fixed issues with heading attributes fragments and ensured proper handling of file errors.
- Loading branch information
Showing
18 changed files
with
374 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Fragment Test File 1 | ||
|
||
This is a test file for the fragment loader. | ||
|
||
## Fragment 1 | ||
|
||
[Link to fragment 2](#fragment-2) | ||
|
||
## Fragment 2 | ||
|
||
[Link to fragment 1 in file2](file2.md#fragment-1) | ||
|
||
## Fragment 3 | ||
|
||
[Link to missing fragment](#missing-fragment) | ||
|
||
[Link to missing fragment in file2](file2.md#missing-fragment) | ||
|
||
## HTML Fragments | ||
|
||
Explicit fragment links are currently not supported. | ||
Therefore we put the test into a code block for now to prevent false positives. | ||
|
||
``` | ||
<a name="explicit-fragment"></a> | ||
[Link to explicit fragment](#explicit-fragment) | ||
``` | ||
|
||
## Custom Fragments | ||
|
||
[Custom fragment id in file2](file2.md#custom-id) | ||
|
||
# Kebab Case Fragment | ||
|
||
[Link to kebab-case fragment](#kebab-case-fragment) | ||
|
||
[Link to second kebab-case fragment](#kebab-case-fragment-1) | ||
|
||
# Kebab Case Fragment | ||
|
||
[Link to another file type](empty_file#fragment) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Fragment Test File 2 | ||
|
||
This is a test file for the fragment loader. | ||
|
||
### Some other heading with custom id {#custom-id} | ||
|
||
#### Fragment 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.