mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Add support for authoring custom rules.
This commit is contained in:
parent
f24f98e146
commit
802c81f929
6 changed files with 375 additions and 97 deletions
|
|
@ -46,6 +46,16 @@ module.exports.clone = function clone(obj) {
|
|||
return assign({}, obj);
|
||||
};
|
||||
|
||||
// Returns true iff the input is a string
|
||||
module.exports.isString = function isString(obj) {
|
||||
return typeof obj === "string";
|
||||
};
|
||||
|
||||
// Returns true iff the input string is empty
|
||||
module.exports.isEmptyString = function isEmptyString(str) {
|
||||
return str.length === 0;
|
||||
};
|
||||
|
||||
// Replaces the text of all properly-formatted HTML comments with whitespace
|
||||
// This preserves the line/column information for the rest of the document
|
||||
// Trailing whitespace is avoided with a '\' character in the last column
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue