Skip to content

Commit 92d61a3

Browse files
committed
A hacky way to allow links to folders, if explicit
1 parent e49f6d6 commit 92d61a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/validateLinks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const main = async () => {
5757
resolved = normalize(path.join(dirname(parsedFile.filename), target));
5858
}
5959
const stats = await stat(resolved).catch(() => undefined);
60-
if (stats?.isDirectory()) {
60+
if (stats?.isDirectory() && !link.content.includes("folder")) {
6161
const readmeExists = await stat(`${resolved}/README.md`).catch(() => undefined);
6262
if (readmeExists) {
6363
// console.log(

validateLinks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const main = async () => {
7878

7979
const stats = await stat(resolved).catch(() => undefined);
8080

81-
if (stats?.isDirectory()) {
81+
if (stats?.isDirectory() && !link.content.includes("folder")) {
8282
const readmeExists = await stat(`${resolved}/README.md`).catch(
8383
() => undefined,
8484
);

0 commit comments

Comments
 (0)