# MD008 - Unordered List Style

This rule enforces consistent use of unordered list markers throughout a document.

## Description

Unordered lists in Markdown can use three different marker types:

- Asterisks (`*`)
- Plus signs (`+`)
- Hyphens/dashes (`-`)

For consistent styling across a document, this rule ensures all unordered list markers match the first marker found in the document. If no marker is found, it defaults to dash (`-`).

## Configuration

- `style`: Specifies a required marker style to use throughout the document regardless of what is found in the content. Available values:
  - `*`: Use asterisks for all unordered list items
  - `+`: Use plus signs for all unordered list items
  - `-`: Use hyphens/dashes for all unordered list items (default)

When no specific style is configured, the rule will automatically detect the first marker style used in the document and use that as the expected style for all list items.

## Examples

<!-- markdownlint-disable -->
### Valid

Using consistent asterisk style markers:

```markdown
* Item 1
* Item 2
  * Nested item
  * Another nested item
* Item 3
```

Using consistent dash style markers:

```markdown
- Item 1
- Item 2
  - Nested item
  - Another nested item
- Item 3
```

Using consistent plus style markers:

```markdown
+ Item 1
+ Item 2
  + Nested item
  + Another nested item
+ Item 3
```

### Invalid

Mixed marker styles:

```markdown
* Item 1
+ Item 2
  - Nested item
  * Another nested item
- Item 3
```

### Fixed

When the first marker style is asterisk:

```markdown
* Item 1
* Item 2
  * Nested item
  * Another nested item
* Item 3
```

When the first marker style is dash:

```markdown
- Item 1
- Item 2
  - Nested item
  - Another nested item
- Item 3
```

When the first marker style is plus:

```markdown
+ Item 1
+ Item 2
  + Nested item
  + Another nested item
+ Item 3
```
<!-- markdownlint-enable -->

## Special Cases

- Markers inside code blocks are ignored
- Configuring a specific style will override the auto-detection feature and enforce that style regardless of what is used in the document
- This rule works in harmony with MD004 (Unordered List Style) but focuses solely on marker character consistency

## Related Rules

- [MD004 - Unordered List Style](md004.md): Similar to MD008 but with more configuration options including "consistent mode"
- [MD005 - List Indentation](md005.md): Ensures consistent indentation in lists
- [MD007 - List Indent](md007.md): Enforces a specific indentation for list items

## Performance Considerations

The MD008 rule is optimized for efficiency, using simple character detection for marker recognition. It processes documents
line-by-line without regex, making it perform well even on large documents with many list items.
