Behaviour SwRS-MDOKFSTUDIO-LIFE-178
The page marks a requested line with an arrow and a band at the line's place
When the host asks the page to reveal a source line, the page SHALL scroll silently so that the line sits at the reading line below the sticky heading band, unfold a folded heading section or a closed details block that holds it, and draw an arrow in the left margin and a light band at the exact line of a paragraph or of a code block itself, at the top of the enclosing block for any other block (a pipe table row, a tab item and the front matter have their own requirements), and at the nearest block for a line outside every block. When the request asks for the if-off-screen scroll, the page SHALL scroll only when the line is not already on screen below the sticky heading band, and SHALL always draw the marker.
Part of StRS-MDOKFSTUDIO-LIFE-023, outside the paths drawn on its map.
Scenarios 2
The situations the tests check; open one to read it.
nominalReveal a code line
boundaryFolded, outside and soft-wrapped lines
| Input | Outcome |
|---|---|
| a line inside a closed details block or a folded heading section | the block unfolds first, then the marker is drawn |
| a line of a paragraph | the marker sits on that soft-wrapped line |
| a line of a list or a quote, or of a list-table, captioned table or raw HTML table | the marker sits at the top of the enclosing block |
| a line outside every block | the marker takes the nearest block |
| a page with no mapped block | nothing is drawn |
| a request with the if-off-screen scroll, the line on screen | the marker is drawn and the page does not move (the sticky band is respected) |
| a request with the if-off-screen scroll, the line off screen | the page scrolls the line to the reading line, as the default scroll does |
Implemented in 8
Tested by 8
- test/core/export/htmlExport.test.tsunit
- test/core/frontmatter/propertiesTable.test.tsunit
- test/core/render/lineMarkerCodeLines.test.tsunit
- test/core/render/markerLines.test.tsunit
- test/page/modules/tabs.test.tsunit
- test/page/runtimeLineMarker.test.tsunit
- test/page/runtimeLineMarkerPlacement.test.tsunit
- test/visual/lineMarkerScenarios.tsvisual