Lists
The formatter normalizes list indentation and preserves list markers.
Rules
- List markers (
-,*,+,1.) are preserved as-is - Leading spaces on top-level list items are removed
- Nested lists are indented consistently
- Blank lines are added before and after list blocks
Examples
Remove leading spaces
Before:
- First item
- Second item
- Third item
After:
- First item
- Second item
- Third item
Nested lists
Before:
- Parent item
- Nested item 1
- Nested item 2
- Another parent
After:
- Parent item
- Nested item 1
- Nested item 2
- Another parent
Numbered lists
Before:
1. First item
2. Second item
3. Third item
After:
1. First item
2. Second item
3. Third item
List surrounded by paragraphs
Before:
Some text
- List item 1
- List item 2
Another paragraph
After:
Some text
- List item 1
- List item 2
Another paragraph