Behaviour SwRS-MDOKFSTUDIO-PALETTE-147
A chosen label is written as a ref role
When the writer chooses a label, the extension SHALL write {ref} with the label in backticks in place of the selection, using the one-line selection as the link text when there is one.
Step 3 of path 1 in StRS-MDOKFSTUDIO-PALETTE-013: from “The labels are listed” to “A ref role is in the text”.
Scenarios 3
The situations the tests check; open one to read it.
nominalNo selection
Giventhe text see and the label intro chosen
Whenthe action runs
Thenthe ref role for intro is inserted after the word see, with the caret after it
nominalSelected text
Giventhe selection the intro and the label intro chosen
Whenthe action runs
Thenthe ref role is written with the link text the intro and the target intro
refusalLabels and selections that give no edit
| Input | Outcome |
|---|---|
| A label with a backtick or an angle bracket | No edit |
| An empty label | No edit |
| A label longer than 200 characters | No edit (the label is at most 200 characters) |
| A selection with a line break or a backtick | No edit |