mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Fix MD007/ul-indent to use parent indent instead of previous indent (fixes #106).
This commit is contained in:
parent
748c8cac17
commit
40ace5bb5e
6 changed files with 58 additions and 15 deletions
|
@ -10,9 +10,8 @@ module.exports = {
|
|||
"tags": [ "bullet", "ul", "indentation" ],
|
||||
"function": function MD005(params, onError) {
|
||||
shared.flattenLists().forEach(function forList(list) {
|
||||
var indent = shared.indentFor(list.items[0]);
|
||||
list.items.forEach(function forItem(item) {
|
||||
shared.addErrorDetailIf(onError, item.lineNumber, indent,
|
||||
shared.addErrorDetailIf(onError, item.lineNumber, list.indent,
|
||||
shared.indentFor(item), null,
|
||||
shared.rangeFromRegExp(item.line, shared.listItemMarkerRe));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue