Skip to content

Commit

Permalink
Ignore hash links (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
endrec authored Jan 31, 2023
1 parent 8c94dc3 commit eee43be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hooks/mdlink-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fi

# This is the recommended way to set the project root for properly resolving absolute paths. See
# https://github.com/tcort/markdown-link-check/issues/16 for more info.
# markdown-link-check 3.10 introduced checking anchors, which does not work witihn the same file. See
# https://github.com/tcort/markdown-link-check/issues/195
TMP_CONFIG="$(mktemp)"
cat > "$TMP_CONFIG" <<EOF
{
Expand All @@ -23,7 +25,12 @@ cat > "$TMP_CONFIG" <<EOF
"pattern": "^/",
"replacement": "file://$(pwd)/"
}
]
],
"ignorePatterns": [
{
"pattern": "^#"
}
]
}
EOF

Expand Down

0 comments on commit eee43be

Please sign in to comment.