mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Validate errorInfo.fixInfo object/properties in extension calls to onError.
This commit is contained in:
parent
5895ea62cb
commit
65f6d38978
3 changed files with 95 additions and 22 deletions
|
@ -44,6 +44,11 @@ module.exports.isEmptyString = function isEmptyString(str) {
|
|||
return str.length === 0;
|
||||
};
|
||||
|
||||
// Returns true iff the input is an object
|
||||
module.exports.isObject = function isObject(obj) {
|
||||
return (obj !== null) && (typeof obj === "object") && !Array.isArray(obj);
|
||||
};
|
||||
|
||||
// Returns true iff the input line is blank (no content)
|
||||
// Example: Contains nothing, whitespace, or comments
|
||||
const blankLineRe = />|(?:<!--.*?-->)/g;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue