mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
This commit is contained in:
parent
13e375b281
commit
517eb42015
12 changed files with 151 additions and 7 deletions
|
|
@ -13,12 +13,14 @@ module.exports = {
|
|||
"function": function MD007(params, onError) {
|
||||
const indent = Number(params.config.indent || 2);
|
||||
const startIndented = !!params.config.start_indented;
|
||||
const startIndent = Number(params.config.start_indent || indent);
|
||||
flattenedLists().forEach((list) => {
|
||||
if (list.unordered && list.parentsUnordered) {
|
||||
list.items.forEach((item) => {
|
||||
const { lineNumber, line } = item;
|
||||
const expectedNesting = list.nesting + (startIndented ? 1 : 0);
|
||||
const expectedIndent = expectedNesting * indent;
|
||||
const expectedIndent =
|
||||
(startIndented ? startIndent : 0) +
|
||||
(list.nesting * indent);
|
||||
const actualIndent = indentFor(item);
|
||||
let range = null;
|
||||
let editColumn = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue