mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-20 16:00:13 +01:00
Update all rules to better handle wrongly-typed configuration parameters.
This commit is contained in:
parent
26ad0550ec
commit
3238ed4249
25 changed files with 134 additions and 39 deletions
|
|
@ -11,9 +11,8 @@ module.exports = {
|
|||
"tags": [ "headings", "headers" ],
|
||||
"function": function MD026(params, onError) {
|
||||
let punctuation = params.config.punctuation;
|
||||
if (punctuation === undefined) {
|
||||
punctuation = allPunctuation;
|
||||
}
|
||||
punctuation =
|
||||
String((punctuation === undefined) ? allPunctuation : punctuation);
|
||||
const trailingPunctuationRe =
|
||||
new RegExp("\\s*[" + escapeForRegExp(punctuation) + "]+$");
|
||||
forEachHeading(params, (heading) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue