[GH-ISSUE #242] MD007 ul-indent doesn't work when MD006 ul-start-left is disabled #2058

Closed
opened 2026-03-07 20:04:07 +03:00 by kerem · 0 comments
Owner

Originally created by @jthomerson on GitHub (Dec 29, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/242

I like to have all my bullet lists always start indented with the standard level of indentation (in my case, three spaces). So, I had to disable ul-start-left, but then when I set the indentation of my lists (MD007), I get an off-by-one [nesting level] error for every single item in every list.

Consider this example:

jrthomerson@mine ~/code/markdownlint-example
[ master ] $ cat test.md
# Test

   * item 1
   * item 2
      * item 2.1
      * item 2.2
         * item 2.2.1
      * item 2.3
   * item 3
jrthomerson@mine ~/code/markdownlint-example
[ master ] $ cat .markdownlint.json
{
   "default": true,
   "line-length": {
      "line_length": 90
   },
   "no-multiple-blanks": { "maximum": 2 },
   "hr-style": { "style": "---" },
   "code-block-style": { "style": "fenced" },
   "code-fence-style": { "style": "backtick" },
   "ul-start-left": false,
   "ul-indent": { "indent": 3 },
   "no-alt-text": false
}
jrthomerson@mine ~/code/markdownlint-example
[ master ] $ ./node_modules/.bin/markdownlint ./test.md
./test.md:3 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3]
./test.md:4 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3]
./test.md:5 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6]
./test.md:6 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6]
./test.md:7 MD007/ul-indent Unordered list indentation [Expected: 6; Actual: 9]
./test.md:8 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6]
./test.md:9 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3]
Originally created by @jthomerson on GitHub (Dec 29, 2019). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/242 I like to have all my bullet lists always start indented with the standard level of indentation (in my case, three spaces). So, I had to disable `ul-start-left`, but then when I set the indentation of my lists (MD007), I get an off-by-one [nesting level] error for every single item in every list. Consider this example: ``` jrthomerson@mine ~/code/markdownlint-example [ master ] $ cat test.md # Test * item 1 * item 2 * item 2.1 * item 2.2 * item 2.2.1 * item 2.3 * item 3 jrthomerson@mine ~/code/markdownlint-example [ master ] $ cat .markdownlint.json { "default": true, "line-length": { "line_length": 90 }, "no-multiple-blanks": { "maximum": 2 }, "hr-style": { "style": "---" }, "code-block-style": { "style": "fenced" }, "code-fence-style": { "style": "backtick" }, "ul-start-left": false, "ul-indent": { "indent": 3 }, "no-alt-text": false } jrthomerson@mine ~/code/markdownlint-example [ master ] $ ./node_modules/.bin/markdownlint ./test.md ./test.md:3 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3] ./test.md:4 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3] ./test.md:5 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6] ./test.md:6 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6] ./test.md:7 MD007/ul-indent Unordered list indentation [Expected: 6; Actual: 9] ./test.md:8 MD007/ul-indent Unordered list indentation [Expected: 3; Actual: 6] ./test.md:9 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 3] ```
kerem 2026-03-07 20:04:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2058
No description provided.