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
|
|
@ -18,8 +18,9 @@ module.exports = {
|
|||
"description": "Inline HTML",
|
||||
"tags": [ "html" ],
|
||||
"function": function MD033(params, onError) {
|
||||
const allowedElements = (params.config.allowed_elements || [])
|
||||
.map((element) => element.toLowerCase());
|
||||
let allowedElements = params.config.allowed_elements;
|
||||
allowedElements = Array.isArray(allowedElements) ? allowedElements : [];
|
||||
allowedElements = allowedElements.map((element) => element.toLowerCase());
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
let match = null;
|
||||
// eslint-disable-next-line no-unmodified-loop-condition
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue