Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-167

An inline THREAD comment shows as a thread chip with its messages

When a document holds a `<!-- THREAD` comment as its own block, the renderer SHALL write a green chip with a speech bubble, labelled with the author of the first message and, with several messages, followed by their number in parentheses, whose box lists each message with its author, date and text, and write any other THREAD comment as an ordinary comment chip.

Step 1 of path 1 in StRS-MDOKFSTUDIO-REVIEW-015: from “A document holds an inline THREAD comment” to “The thread chip is open with its messages”.

Scenarios 6

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

nominalChip label
ThreadChip
Two messages, the first by User 1The chip reads "User 1 (2)"; its wrapper has the kind thread and the count 2
One message by AdaThe chip reads Ada
nominalOpen thread lists one entry for each message
Givena thread of two messages
Whenthe chip is opened
Thena box titled Thread shows two entries with author, date and text, and the text keeps its line breaks; the same thread written with CRLF line ends and trailing spaces gives the same entries
nominalA message is a header line followed by indented text
Givena thread with the headers "User 1 (2026-10-16 10:47):" and "User 2 (2026-10-16 10:52):", the first text spanning two lines
Whenthe body is read
Thentwo messages are returned with author, date and text; each line after a header up to the next header loses one indentation of up to two spaces or a tab, and blank lines inside a message are kept
boundaryIndentation and blank lines
InputOutcome
A message indented with a tab and holding a blank lineThe text is "first\n\nsecond"
A line that is not indentedThe line is kept as text
refusalA THREAD comment that is not a thread
InputOutcome
The comments "THREADS", "TODO THREAD", "THREAD" aloneNone is a thread; THREADS and THREAD alone are ordinary comment chips, TODO THREAD is a TODO chip
"THREAD" with stray text before the first headerNot a thread
A header dated 2026-1-2 3:04 (another date format)Not a thread
A THREAD comment inside a paragraphA gray comment chip
boundaryA thread inside a tab item keeps its own source lines
Givena tab item that holds an inline thread comment from line 7 to line 12
Whenthe document is rendered
Thenthe thread wrapper carries data-line 7 and data-end-line 12, so that the reply and the delete of the thread name those lines, and the tab panel stays one block

Implemented in 3

Tested by 5