mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
MD029 and MD030 should allow ordered list in blockquote
This commit is contained in:
parent
3db84df660
commit
84ff8bb616
2 changed files with 12 additions and 3 deletions
|
|
@ -622,7 +622,7 @@ module.exports = [
|
||||||
if (!list.unordered) {
|
if (!list.unordered) {
|
||||||
var number = 1;
|
var number = 1;
|
||||||
list.items.forEach(function forItem(item) {
|
list.items.forEach(function forItem(item) {
|
||||||
var re = new RegExp("^\\s*" + String(number) + "\\.");
|
var re = new RegExp("^(\\s|> )*" + String(number) + "\\.");
|
||||||
if (!re.test(item.line)) {
|
if (!re.test(item.line)) {
|
||||||
errors.push(item.lineNumber);
|
errors.push(item.lineNumber);
|
||||||
}
|
}
|
||||||
|
|
@ -652,8 +652,8 @@ module.exports = [
|
||||||
(allSingle ? ulSingle : ulMulti) :
|
(allSingle ? ulSingle : ulMulti) :
|
||||||
(allSingle ? olSingle : olMulti);
|
(allSingle ? olSingle : olMulti);
|
||||||
list.items.forEach(function forItem(item) {
|
list.items.forEach(function forItem(item) {
|
||||||
var match = /^\s*\S+(\s+)/.exec(item.line);
|
var match = /^(\s|> )*\S+(\s+)/.exec(item.line);
|
||||||
if (!match || (match[1].length !== expectedSpaces)) {
|
if (!match || (match[2].length !== expectedSpaces)) {
|
||||||
errors.push(item.lineNumber);
|
errors.push(item.lineNumber);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
9
test/ordered_list_in_blockquote.md
Normal file
9
test/ordered_list_in_blockquote.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
> 1. The simplest ordered list in blockquote
|
||||||
|
|
||||||
|
1. ol
|
||||||
|
|
||||||
|
> 1. ol-li-blockquote-ol-li
|
||||||
|
> 1. ol-li-blockquote-ol-li-ol-li {MD027}
|
||||||
|
|
||||||
|
> 1. blockquote-ol-li
|
||||||
|
> 1. blockquote-ol-li-ol-li {MD027}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue