MD058 - blanks-around-tables¶
Description¶
This rule enforces blank lines around tables. It triggers when tables are not preceded or followed by a blank line. The first table in a document does not require a blank line above, and the last table at the end of a document does not require a blank line below.
Rationale¶
In addition to aesthetic reasons, some parsers will incorrectly parse tables that don't have blank lines before and after them. Consistent spacing around tables improves readability and ensures proper parsing across different Markdown implementations.
Examples¶
Invalid¶
Some text here.
| Header | Header |
| ------ | ------ |
| Cell | Cell |
> Blockquote
Valid¶
Some text here.
| Header | Header |
| ------ | ------ |
| Cell | Cell |
More text here.