# MD075 - Orphaned table rows / headerless tables

Aliases: `orphaned-table-rows`

## What this rule does

Detects pipe-formatted rows that won't render as part of a GFM table. It catches two cases:

1. **Orphaned rows** separated from a preceding table by accidental blank lines
2. **Headerless pipe content** that looks like a table but lacks the required header/delimiter structure

## Why this matters

- **Broken rendering**: Rows separated from a table by blank lines render as plain text, not as table cells
- **Missing structure**: Pipe-formatted rows without a header/delimiter never render as a table
- **Likely accidental**: These patterns almost always indicate a formatting mistake

## Examples

### Case 1: Orphaned rows (auto-fixable)

#### Incorrect

```markdown
| Value        | Description       |
| ------------ | ----------------- |
| `consistent` | Default style     |

| `fenced`     | Fenced style      |
| `indented`   | Indented style    |
```

The blank line causes `fenced` and `indented` rows to render as plain text.

#### Fixed

```markdown
| Value        | Description       |
| ------------ | ----------------- |
| `consistent` | Default style     |
| `fenced`     | Fenced style      |
| `indented`   | Indented style    |
```

### Case 2: Headerless pipe content (warn only)

#### Incorrect

```markdown
Some text.

| value1 | description1 |
| value2 | description2 |

More text.
```

These rows have no header or delimiter row, so they won't render as a table.

#### Correct

```markdown
Some text.

| Key    | Value        |
| ------ | ------------ |
| value1 | description1 |
| value2 | description2 |

More text.
```

## Configuration

This rule has no configuration options.

## Automatic fixes

This rule can automatically fix **Case 1** (orphaned rows) by:

- removing the blank lines between the table and orphaned rows
- merging them into a single table
- normalizing spacing/alignment for the merged table block

**Case 2** (headerless pipe content) cannot be auto-fixed because the correct header text is unknown.

## Learn more

- [GitHub Flavored Markdown: Tables](https://github.github.com/gfm/#tables-extension-)
- [Markdown Guide: Tables](https://www.markdownguide.org/extended-syntax/#tables)

## Related rules

- [MD055 - Keep table formatting consistent](md055.md)
- [MD056 - Keep table column count consistent](md056.md)
- [MD058 - Add blank lines around tables](md058.md)
