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
| Input | Outcome |
|---|---|
| the key bad key (a blank) | no edit |
| a key with a comma | no edit |
| no key, or an empty key | no edit |
| a key with a backtick | no edit |
| a key with an angle bracket | no edit |
| a key with a line break | no edit |
| the key smith2024 over the selection [text] | the selection is replaced by {cite}`smith2024` with the caret after it |