mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add detail to MD029/ol-prefix message to help distinguish 1/1/1 from 1/2/3.
This commit is contained in:
parent
0fd322a380
commit
f910fa0cb1
3 changed files with 7 additions and 5 deletions
|
@ -752,7 +752,8 @@ module.exports = [
|
|||
list.items.forEach(function forItem(item) {
|
||||
var match = /^[\s>]*([^.)]*)[.)]/.exec(item.line);
|
||||
errors.addDetailIf(item.lineNumber,
|
||||
String(number), !match || match[1]);
|
||||
String(number), !match || match[1],
|
||||
"Style: " + (style === "one" ? "1/1/1" : "1/2/3"));
|
||||
if (style === "ordered") {
|
||||
number++;
|
||||
}
|
||||
|
@ -1187,7 +1188,7 @@ module.exports = [
|
|||
if (names.indexOf(wordMatch) === -1) {
|
||||
var lineNumber = token.lineNumber + index + fenceOffset;
|
||||
var range = [ match.index + 1, wordMatch.length ];
|
||||
errors.addDetailIf(lineNumber, name, match[1], range);
|
||||
errors.addDetailIf(lineNumber, name, match[1], null, range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue