Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-TABLE-115

Table with caption wraps the table at the caret in a table directive

When the writer runs Table with caption, the extension SHALL wrap the pipe table at the caret in a :::{table} Caption directive, or insert a new captioned 2 x 2 table when the caret is outside a pipe table, and select the word Caption.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-TABLE-016, in the state “A pipe table is in the text”.

Scenarios 4

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

nominalWrap the pipe table at the caret
Giventhe caret in a pipe table
WhenTable with caption is run
Thenthe table is enclosed between :::{table} Caption and a closing fence and the word Caption is selected
refusalAlready captioned
Giventhe caret in a pipe table already inside a {table} directive
Whenthe action is run
Thenno edit is produced
nominalCaret in a paragraph
Giventhe caret in a paragraph
WhenTable with caption is run
Thena :::{table} Caption directive holding a two-column table with one empty row is inserted on its own lines, after the selection, with the word Caption selected
boundaryCaret in another table form
Giventhe caret in a {list-table} or an HTML table
Whenthe action is run
Thena new captioned table is inserted on its own lines after the last line of that table, which stays whole

Implemented in 1

Tested by 2