Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-PALETTE-149

A chosen bibliography key is written as a cite role

When the writer chooses a key in the Citation list, the extension SHALL write {cite} with the key in backticks in place of the selection, and produce no edit for a key that is empty or that holds a blank, a comma, a backtick, an angle bracket or a line break.

Part of StRS-MDOKFSTUDIO-PALETTE-013, outside the paths drawn on its map.

Scenarios 3

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

nominalKey chosen
Giventhe text claim and the key smith2024
Whenthe action runs
Thenthe text is claim {cite}`smith2024` with the caret after it, and a selection is replaced
refusalInvalid key
Givena key that contains a blank or a comma
Whenthe action runs
Thenno edit is produced
boundaryKeys that give no edit
InputOutcome
the key bad key (a blank)no edit
a key with a commano edit
no key, or an empty keyno edit
a key with a backtickno edit
a key with an angle bracketno edit
a key with a line breakno edit
the key smith2024 over the selection [text]the selection is replaced by {cite}`smith2024` with the caret after it

Implemented in 1

Tested by 1