Behaviour SwRS-MDOKFSTUDIO-CORE-001
The preview renders the unsaved buffer in process and keeps the newest edit
When the active Markdown buffer changes, the extension SHALL render the buffer text, saved or unsaved, completely to HTML inside the extension process and keep only the result of the newest edit.
Step 1 of path 1 in StRS-MDOKFSTUDIO-CORE-001: from “A Markdown file is open beside its preview” to “The preview shows the unsaved text”.
Part of StRS-MDOKFSTUDIO-CORE-003, outside the paths drawn on its map.
Scenarios 3
The situations the tests check; open one to read it.
nominalRender the unsaved buffer in process
Givena Markdown document with unsaved edits is open in the editor and the file on disk holds older text
Whenthe preview renders
Thenthe page shows the unsaved text, the rendered HTML matches the buffer text and not the disk text, and no Sphinx process or temporary file is used
refusalCancel a superseded render
Givena render in progress
Whena newer edit arrives
Thenthe old render is canceled with the message "The MyST render was canceled because a newer edit arrived." and its result is not shown
boundaryDiscard the late result of a canceled render
Givena canceled render that completes late
Whenits result arrives
Thenthe page keeps the newer render
Implemented in 3
Tested by 3
Replaces
SwRS-MDOKFSTUDIO-CORE-002Render the CommonMark blocks superseded superseded by SwRS-MDOKFSTUDIO-CORE-001 Markdown file
SwRS-MDOKFSTUDIO-CORE-021Refuse the render when trust is required superseded superseded by SwRS-MDOKFSTUDIO-CORE-001 Markdown file
SwRS-MDOKFSTUDIO-CORE-026Cancel a superseded render superseded superseded by SwRS-MDOKFSTUDIO-CORE-001 Markdown file
SwRS-MDOKFSTUDIO-CORE-038Render a very long document completely superseded superseded by SwRS-MDOKFSTUDIO-CORE-001 Markdown file
SwRS-MDOKFSTUDIO-CORE-046Render identically in every palette mode superseded superseded by SwRS-MDOKFSTUDIO-CORE-001 Markdown file