# MD013 - Line Length

This rule enforces a maximum line length to improve readability.

## Description

Lines in the Markdown document should not exceed a certain length. This helps with readability and ensures that content is displayed properly in various environments.

## Configuration

- `line_length`: Maximum line length (default: 200)
- `code_blocks`: Whether to enforce line length in code blocks (default: true)
- `tables`: Whether to enforce line length in tables (default: true)
- `headings`: Whether to enforce line length in headings (default: true)

## Examples

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

```markdown
This is a line that is under the maximum line length limit.

Code blocks are also checked:
```

### Invalid

```markdown
This is a very long line that exceeds the maximum line length limit and will trigger a warning because it's harder to read and might not display properly in some environments.
```

### Fixed

```markdown
This is a line that has been broken up
to stay under the maximum line length limit.
```
<!-- markdownlint-enable -->

## Special Cases

- When `code_blocks` is false, lines in code blocks are not checked
- When `tables` is false, lines in tables are not checked
- When `headings` is false, lines in headings are not checked
- Links and image references may need special handling to avoid breaking URLs

## Related Rules

- [MD009 - No trailing spaces](md009.md)
- [MD047 - Files should end with a single newline character](md047.md)
