mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Allow a custom rule's onError implementation to override that rule's information URL for each error.
This commit is contained in:
parent
14974e52a9
commit
c699b8e22b
7 changed files with 235 additions and 18 deletions
|
|
@ -73,7 +73,12 @@ module.exports.isEmptyString = function isEmptyString(str) {
|
|||
|
||||
// Returns true iff the input is an object
|
||||
module.exports.isObject = function isObject(obj) {
|
||||
return (obj !== null) && (typeof obj === "object") && !Array.isArray(obj);
|
||||
return !!obj && (typeof obj === "object") && !Array.isArray(obj);
|
||||
};
|
||||
|
||||
// Returns true iff the input is a URL
|
||||
module.exports.isUrl = function isUrl(obj) {
|
||||
return !!obj && (Object.getPrototypeOf(obj) === URL.prototype);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue