Behaviour SwRS-MDOKFSTUDIO-REVIEW-017
The quote of a thread is highlighted once in its block, also over a line break of the source
When review threads are applied to the page, the extension SHALL wrap the first occurrence of each thread quote, found inside one text node of the innermost mapped block that covers the anchor line, in one highlight, or add a badge to that block when the quote is not found inside one text node, and never mark code, math, diagrams, the properties table, open editors or included content; a run of whitespace of the text node, such as the line break of a paragraph or list item wrapped over several lines of the source, matches a space of the quote, and the matched text is highlighted as one highlight.
Step 2 of path 1 in StRS-MDOKFSTUDIO-REVIEW-001: from “The threads reach the page” to “The quoted text is highlighted”.
Scenarios 11
The situations the tests check; open one to read it.
nominalQuote in the block of the line
boundaryQuote at the start of a text node
refusalRegions that are never marked
| Input | Outcome |
|---|---|
| Threads anchored on a code block, math, the properties table and a block under an open editor | No highlight is created in any of them |
| A block that comes from an include directive and carries lines of another file, with a thread anchor line inside it | The block is not chosen for the highlight |
| A review thread whose quote text also appears inside a Mermaid figure and a PlantUML figure | No comment mark is added inside either figure |
boundarySame text in a figure and in a paragraph
nominalQuote across an element boundary
boundaryBlock that takes no children
boundaryApplied again
| Input | Outcome |
|---|---|
| The same threads applied a second time to a page with a highlighted quote | The page holds one highlight, as after the first run |
| A content patch that replaces the blocks, then the threads applied again | The highlight is on the new content and none is left on removed nodes |
nominalResolved style
| Input | Outcome |
|---|---|
| A resolved thread with a highlighted quote | The highlight carries the resolved attribute and is drawn differently from an open one; its badge and orphaned comments entry are drawn in the resolved style too |
| An open thread | The highlight has no resolved attribute |