Skip to content

Commit eee43be

Browse files
authored
Ignore hash links (#86)
1 parent 8c94dc3 commit eee43be

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

hooks/mdlink-check.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ fi
1515

1616
# This is the recommended way to set the project root for properly resolving absolute paths. See
1717
# https://github.com/tcort/markdown-link-check/issues/16 for more info.
18+
# markdown-link-check 3.10 introduced checking anchors, which does not work witihn the same file. See
19+
# https://github.com/tcort/markdown-link-check/issues/195
1820
TMP_CONFIG="$(mktemp)"
1921
cat > "$TMP_CONFIG" <<EOF
2022
{
@@ -23,7 +25,12 @@ cat > "$TMP_CONFIG" <<EOF
2325
"pattern": "^/",
2426
"replacement": "file://$(pwd)/"
2527
}
26-
]
28+
],
29+
"ignorePatterns": [
30+
{
31+
"pattern": "^#"
32+
}
33+
]
2734
}
2835
EOF
2936

0 commit comments

Comments
 (0)