Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
{
"pattern": "^https://github\\.com/.*/wiki/"
},
{
"pattern": "^https://github\\.com/users/.*/projects/"
},
{
"pattern": "^https?://localhost[:/]"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The regular expression ^https?://localhost[:/] is a bit restrictive. It will not match a URL that is just http://localhost without a trailing port or path. Using a word boundary (\b) would make this pattern more robust, correctly matching localhost as a whole word in various URL formats (e.g., with a port, with a path, or standalone) while avoiding matches for hostnames that merely start with localhost.

Suggested change
"pattern": "^https?://localhost[:/]"
"pattern": "^https?://localhost\\b"

},
{
"pattern": "^#"
}
Expand Down