MD069 - No duplicate list markers¶
Aliases: no-duplicate-list-markers
What this rule does¶
Detects duplicate list markers that typically occur from copy-paste with editor auto-list-continuation, such as - - text instead of - text.
Why this matters¶
- Unintended nesting: CommonMark parses
- - textas a nested list, which is almost never the intended behavior - Visual confusion: The extra marker clutters the document and creates unexpected formatting
- Copy-paste artifacts: This pattern commonly occurs when copying list items while editors auto-continue lists
- Easy to overlook: The duplicate marker blends in and can be missed during review
Examples¶
✅ Correct¶
❌ Incorrect¶
🔧 Fixed¶
How this happens¶
This pattern typically occurs when:
-
Copy-paste in editors: You copy a list item, move to the next line (where the editor auto-inserts a list marker), then paste. Result: two markers.
-
Double keystroke: Accidentally pressing the marker key twice.
-
Merge conflicts: Git merge artifacts can create duplicate markers.
Configuration¶
This rule has no configuration options.
Automatic fixes¶
This rule automatically removes the first list marker, keeping the second one. For example:
- - textbecomes- text* * textbecomes* text- * textbecomes* text(keeps the second marker)
Indentation is preserved during the fix.
What this rule does NOT flag¶
- --flag- CLI flags (the second-is not followed by a space)* *emphasis*- Emphasis markers (the second*starts emphasis, not a list)- **bold**- Bold text starting a list item- Properly indented nested lists - these are intentional
Learn more¶
- CommonMark list specification - How lists are parsed
- Nested lists - How to create intentional nested lists