Currently, swapping a string for another means you need to convert it to a temp first. E.g. replacing a with b and b with a would look like this:
[[ replace ]]
from = "a"
to = "c"
[[ replace ]]
from = "b"
to = "a"
[[ replace ]]
from = "c"
to = "b"
This is pretty awkward, especially for nonprogrammers, and error-prone (what if the string you choose already exists in the doc?).
I propose we have a mode that does this automatically. Something like:
swap = true
from = "a"
to = "b"
Since this only works with exact matches, perhaps the syntax should not allow combining it with regex by switching them both to a mode (or strategy?) setting:
Currently, swapping a string for another means you need to convert it to a temp first. E.g. replacing a with b and b with a would look like this:
This is pretty awkward, especially for nonprogrammers, and error-prone (what if the string you choose already exists in the doc?).
I propose we have a mode that does this automatically. Something like:
Since this only works with exact matches, perhaps the syntax should not allow combining it with regex by switching them both to a
mode
(orstrategy
?) setting:(and
regexp = true
would becomemode = regexp
)