-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for linking to directories
Previously, a link to a directory such as `folder#anchor`, didn’t work. This commit adds support for, in such a case: 1. Loading the particular readme file that vendors such as GitHub, GitLab, and BitBucket display as an index on those page 2. For every processed file that is a readme of a directory, marking its anchors as valid Closes GH-49. Closes GH-50.
- Loading branch information
Showing
8 changed files
with
195 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This file isn’t used when linking to the folder: it has to be a `readme`. |
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,23 @@ | ||
Here we link to a folder: | ||
|
||
Explicit: | ||
|
||
[OK](./folder/readme.markdown#this) | ||
|
||
[OK](./folder/readme.markdown#that) | ||
|
||
[NOK](./folder/readme.markdown#missing) | ||
|
||
Implicit: | ||
|
||
[OK](./folder#this) | ||
|
||
[OK](./folder#that) | ||
|
||
[NOK](./folder#missing) | ||
|
||
Other: | ||
|
||
[NOK](./missing#missing) | ||
|
||
[NOK](./folder-without-readme#missing) |
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 @@ | ||
This file isn’t used when linking to the folder: it has to be a `readme`. |
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,9 @@ | ||
readme | ||
------ | ||
|
||
While GitHub would pick up on this readme for the folder, | ||
`remark-validate-links` is for Markdown, so we ignore AsciiDoc. | ||
|
||
== This | ||
|
||
== That |
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,5 @@ | ||
# readme | ||
|
||
## This | ||
|
||
## That |
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 @@ | ||
This one isn’t used (`readme.markdown` sorts before `readme.md`). |
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