Hide empty line before tables

Use case or problem

An empty line before a table adheres to the Markdown standard, however visually you often don’t want an empty line displayed in front of your table.

Proposed solution

Detect empty lines before tables and either hide them or make their height smaller to create visually more appealing rendering and flow.
When the cursor is being moved into this line then display it with it’s normal height.

Current workaround (optional)

N/A

Related feature requests (optional)

N/A

There’s a CSS workaround:

/* hides blank line above markdown table when cursor is away */

.cm-line:has(+ .cm-table-widget):not(.cm-active) {
	line-height: 4px;
}

You can reduce that height as much as you want, even to “0”.

Note that in the default theme, setting it below 12px makes your cursor skip the table when arrowing down into the blank line. Arrowing into the line from the other directions works fine.