Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TABLE-121

A pipe table inside a quote or an admonition is edited cell by cell, its container prefix kept

When the writer clicks a cell of a pipe table inside a blockquote, a GFM alert or a MyST admonition in edit mode, the extension SHALL open the cell editor and the table bar, write every table line back with its container prefix, leave the other lines of the container unchanged, and fall back to the raw block editor when the table cannot be located safely.

Step 1 of path 2 in StRS-MDOKFSTUDIO-TABLE-001: from “A pipe table inside a blockquote, a GFM alert or a MyST admonition is shown in edit mode” to “The cell editor is open”.

Scenarios 3

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

nominalA cell of a quoted table, a GitHub alert table or a MyST admonition table
Givenedit mode and a pipe table whose lines carry a container prefix (`> | Q1 | Q2 |` in a blockquote, `> | N1 | N2 |` under `> [!NOTE]`), or sit in the body of a MyST admonition directive (a `{note}` fence with an option line, a `:::{note}` block)
Whenthe writer clicks a cell of that table
Thenthe page opens the cell editor and the table bar, as for a top-level table, not the raw block editor; typing and Enter save one edit whose text is the table's source lines with only the edited cell changed and the container prefix on every line (unit tests test/page/runtimeTableInContainer.test.ts "a click on a cell of a table inside a quote opens the cell editor and the table bar, not the raw editor", "typing in a quoted table and Enter save one edit of the container: only the edited line changes", test/page/modules/tableInContainer.test.ts "the table of a quote is read without its prefix and written back with it", "the table of a GitHub alert keeps the marker line byte for byte", "the table of a MyST directive keeps the fence and the option lines byte for byte")
nominalTab in the last cell adds a prefixed row
Giventhe cell editor open in the last cell of a quoted table
Whenthe writer presses Tab, or presses a row or column button of the bar
Thenthe table is saved with the new row or column line carrying the same prefix as the other lines, and once the page renders the saved text the editor reopens in the same table, in the cell the action selects (unit tests test/page/runtimeTableInContainer.test.ts "Tab in the last cell of a quoted table adds a prefixed row and the editor reopens in that table", "the second of two tables in a quote is edited by its rank and reopens by its rank"; real input test/integration/realInput/tableInContainer.ts)
boundaryWhich table and which prefix
InputOutcome
A nested quote (`> >AB`)Every line keeps both markers
A quote marker without a space (`>AB`)Written back as it is, the new lines too
Two tables in one quote, the second clickedThe table is found by its rank among the rendered tables of the block and the pipe tables of its source; the other table and the text between them stay byte for byte
Windows line endingsKept on every line, the closing line break kept or absent as in the source
No change to the tableThe saved text equals the source byte for byte
The table's lines do not share one prefix (a lazy line without `>`, `>` mixed with `> `)The raw block editor opens
The rendered tables of the block and the pipe tables of the source differ in numberThe raw block editor opens
The table text without its prefix does not parseThe raw block editor opens
Convert to list-tableDisabled, its title says "Not available for a table inside a quote or an admonition"
Row and column drag handlesOffered and working as on a top-level table, the source holding exactly one pipe table (otherwise a move is refused and nothing is saved); a move saves the table lines with the container prefix on every line (test/page/runtimeTableRowMove.test.ts "a row of a table inside a quote moves with the quote prefix kept on every line", "a column of a table inside a quote moves with the quote prefix kept on every line")

Implemented in 5

Tested by 6