mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40: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
|
|
@ -9,7 +9,9 @@ module.exports = {
|
|||
"description": "Emphasis used instead of a heading",
|
||||
"tags": [ "headings", "headers", "emphasis" ],
|
||||
"function": function MD036(params, onError) {
|
||||
const punctuation = params.config.punctuation || allPunctuation;
|
||||
let punctuation = params.config.punctuation;
|
||||
punctuation =
|
||||
String((punctuation === undefined) ? allPunctuation : punctuation);
|
||||
const re = new RegExp("[" + punctuation + "]$");
|
||||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function base(token) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue