Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-BLOCK-266

Edit mode shows each shown blank line as a blank-line block

When edit mode is on, the extension SHALL show each shown blank line as one blank-line block, so that N blank lines between two blocks show N-1 blocks, the first being the separator that stays hidden, and it shows every blank line at the end of the body, at the top of a file without frontmatter and in a body of only blank lines; of the empty quote lines of a run it shows all but the first, wherever the run stands. This holds between top-level blocks, between list items, inside a list item, and inside a quote, an alert, an admonition, a definition or a footnote; the blocks are placed from the host's list of shown lines, inside the list item or container that holds them, and nothing is shown for a separator, a blank line inside another block (a fence, an HTML block or a table), next to a folded block, in a folded or included list, in reading mode or in the export.

Step 1 of path 3 in StRS-MDOKFSTUDIO-BLOCK-011: from “Edit mode is on and the document has extra blank lines” to “A blank-line block is shown”.

Part of StRS-MDOKFSTUDIO-BLOCK-025, outside the paths drawn on its map.

Scenarios 6

The situations the tests check; open one to read it.

nominalBlank lines are shown
Givenedit mode on and a source with two blank lines between two blocks, two at the start of a file without frontmatter, and three at the end of the body
Whenthe content is rendered or patched
Thenthe two between the blocks show one blank-line block (the first line is the separator), the two at the start show two, and the three at the end show three, each labelled "Blank line", placed after the insert point of the block above (or first, or before Start writing), and the host's hidden list of shown lines (data-okf-blank-runs) is the only source of them
nominalA line of text then six blank lines
Givenedit mode on and a line of text followed by six blank lines at the end of the body
Whenthe content is rendered
Thensix blank-line blocks show, one for each blank line
nominalFrontmatter then three blank lines
Givenedit mode on and frontmatter followed by three blank lines and nothing else
Whenthe content is rendered
Thenthree blank-line blocks show, because the body has no block to separate
nominalQuote lines
Givenedit mode on and a quote with three empty quote lines in a row
Whenthe content is rendered
Thentwo blank-line blocks show inside the quote, the first empty quote line being the separator
nominalRuns inside a list are shown
Givenedit mode on and a top-level list with a run between two items and a run between two paragraphs of an item
Whenthe content is rendered or patched
Theneach shown blank line is one blank-line block placed inside the list item that holds it, after the last child that starts before it, and a patch that replaces the list puts the block back in the new item
nominalNothing is shown
Givena single blank separator, a run inside a code fence, a directive, an HTML block or a table (also in a list item), a run inside a quote, an alert, an admonition or a list they hold, a run next to a folded block, a folded or included list, reading mode, or the export
Whenthe content is rendered
Thenno blank-line block exists, and the export drops data-okf-blank-runs and data-okf-blank-lines

Implemented in 13

Tested by 12