Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-192

Deleting an inline thread removes whole lines, and a malformed delete message changes nothing

When the host applies a delete of an inline thread, the extension SHALL remove the lines of the thread and one surrounding blank line when both neighbours are blank or missing, remove the line break before a thread that ends the file, and change nothing else; a previewThreadDelete message is dropped unless it has an edit id and integer lines with 1 <= line <= endLine.

Step 2 of path 2 in StRS-MDOKFSTUDIO-REVIEW-015: from “The delete is sent with the lines of the thread” to “The thread is gone from the document”.

Scenarios 5

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

nominalBlank neighbours
Givena thread between two blank lines
Whenit is deleted
Thenthe thread and one blank line go and no double gap is left
boundaryPosition of the thread in the file
InputOutcome
A thread directly after a text lineonly the thread lines go
A thread on the last lines of the filethe line break before it goes: the file ends with the text before it and no trailing blank line is left (the edit range ends at the end of the file and starts at the end of the previous line)
A thread on the first lines of the filethe thread and the blank line after it go
refusalLines that are not exactly one thread
Givenlines that hold ordinary text, a part of the thread, or the thread and more
Whena delete is asked
Thenthe answer is "The thread is no longer in the source. Refresh the preview." and the document is unchanged, as for a reply (see SwRS-MDOKFSTUDIO-REVIEW-186)
nominalValid delete message
Givena previewThreadDelete message with an edit id and lines 5 and 8
Whenthe message is validated
Thenit is accepted
refusalInvalid delete message
InputOutcome
A missing edit iddropped
Line 0dropped
An end line before the linedropped

Implemented in 2

Tested by 4

Replaces

SwRS-MDOKFSTUDIO-REVIEW-178An inline thread change message carries valid lines and a non-blank text superseded superseded by SwRS-MDOKFSTUDIO-REVIEW-186, SwRS-MDOKFSTUDIO-REVIEW-192 Markdown file