MD029 and MD030 should allow ordered list in blockquote

This commit is contained in:
OHTAKE Tomohiro 2016-09-07 17:09:13 +09:00
parent 3db84df660
commit 84ff8bb616
2 changed files with 12 additions and 3 deletions

View file

@ -622,7 +622,7 @@ module.exports = [
if (!list.unordered) {
var number = 1;
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)) {
errors.push(item.lineNumber);
}
@ -652,8 +652,8 @@ module.exports = [
(allSingle ? ulSingle : ulMulti) :
(allSingle ? olSingle : olMulti);
list.items.forEach(function forItem(item) {
var match = /^\s*\S+(\s+)/.exec(item.line);
if (!match || (match[1].length !== expectedSpaces)) {
var match = /^(\s|> )*\S+(\s+)/.exec(item.line);
if (!match || (match[2].length !== expectedSpaces)) {
errors.push(item.lineNumber);
}
});