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
nominalA line of text then six blank lines
nominalFrontmatter then three blank lines
nominalQuote lines
nominalRuns inside a list are shown
nominalNothing is shown
Implemented in 13
- src/core/export/exportContent.ts
- src/core/mapping/blankRuns.ts
- src/core/mapping/blockRange.ts
- src/core/mapping/quoteLine.ts
- src/core/preview/styles/blankLinesInContainersStyles.ts
- src/core/preview/styles/editModeStyles.ts
- src/core/render/mystBlockTransforms.ts
- src/core/render/mystNormalize.ts
- src/core/render/mystRenderer.ts
- src/core/render/renderPipeline.ts
- src/page/features/blankLines.ts
- src/page/features/blankRunHosts.ts
- src/page/features/blockSelectionView.ts
Tested by 12
- test/core/export/htmlExport.test.tsunit
- test/core/mapping/blankRuns.test.tsunit
- test/core/mapping/quoteBlankRuns.test.tsunit
- test/core/protocol/pageToHost.test.tsunit
- test/core/render/blankRunsInLists.test.tsunit
- test/core/render/blankRunsList.test.tsunit
- test/integration/blankLines.test.tsintegration
- test/page/runtimeBlankLines.test.tsunit
- test/page/runtimeBlankLinesContainers.test.tsunit
- test/visual/blankLinesBlockScenarios.tsvisual
- test/visual/capture_blank_lines_block.pyvisual
- test/visual/capture_blank_lines_containers.pyvisual