Re-indents every table line from scratch
All 9 scenarios hold
The formatter strips the leading whitespace from each input line. It then re-indents the line with the base indent plus one level of the configured indent. The base indent is the indentation of the surrounding code. A blank line stays completely empty.
The final element of Result lines is the indent of the closing text block quotes. It is empty when the indent size is zero. The next rule shows that line with the quotes on it.
The style is spaces or tabs. With a tab style, each level is that many tab characters, and the formatter keeps them as tabs.
expected outcome
broken scenario
| Scenario | Table lines | Base indent | Configured indent | Result lines? |
|---|---|---|---|---|
| No indent configured |
| “” | space:0 |
|
| Spaces, no base indent |
| “” | space:4 |
|
| Spaces on top of a base indent |
| space:2 |
| |
| Tabs, one per level |
| “” | tab:1 |
|
| Tabs, two per level |
| “” | tab:2 |
|
| Input lines indented unevenly |
| “” | space:4 |
|
| A header and no data rows |
| “” | space:4 |
|
| A comment line among the rows |
| “” | space:2 |
|
| A blank line among the rows |
| “” | space:2 |
|