mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD004/ul-style to handle invalid "style" parameter values.
This commit is contained in:
parent
77217ce33e
commit
a92da33235
3 changed files with 24 additions and 1 deletions
|
@ -1849,6 +1849,7 @@ var differentItemStyle = {
|
|||
"plus": "asterisk",
|
||||
"asterisk": "dash"
|
||||
};
|
||||
var validStyles = Object.keys(expectedStyleToMarker);
|
||||
module.exports = {
|
||||
"names": ["MD004", "ul-style"],
|
||||
"description": "Unordered list style",
|
||||
|
@ -1874,6 +1875,9 @@ module.exports = {
|
|||
}
|
||||
expectedStyle = nestingStyles[nesting];
|
||||
}
|
||||
if (!validStyles.includes(expectedStyle)) {
|
||||
expectedStyle = validStyles[0];
|
||||
}
|
||||
var range = null;
|
||||
var fixInfo = null;
|
||||
var match = item.line.match(listItemMarkerRe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue