diff --git a/src/core/operations/EscapeSmartCharacters.mjs b/src/core/operations/EscapeSmartCharacters.mjs index 5b5ced5e..72a4c5fe 100644 --- a/src/core/operations/EscapeSmartCharacters.mjs +++ b/src/core/operations/EscapeSmartCharacters.mjs @@ -29,7 +29,7 @@ class EscapeSmartCharacters extends Operation { this.args = [ /* Arguments. See the project wiki for full details.*/ { - name: "Second arg", + name: "Output action", type: "option", value: ["Escape", "Remove", "Replace with '.'"] } diff --git a/tests/operations/tests/EscapeSmartCharacters.mjs b/tests/operations/tests/EscapeSmartCharacters.mjs index aeee315b..45374f42 100644 --- a/tests/operations/tests/EscapeSmartCharacters.mjs +++ b/tests/operations/tests/EscapeSmartCharacters.mjs @@ -18,5 +18,26 @@ }, ], }, + { + name: "Escape Smart Characters - Remove", + input: "“”—‘’ →©…", + expectedOutput: " ", + recipeConfig: [ + { + op: "Escape Smart Characters", + args: ["Remove"], + }, + ], + }, + { + name: "Escape Smart Characters - Replace", + input: "“”—‘’ →©…", + expectedOutput: "..... ...", + recipeConfig: [ + { + op: "Escape Smart Characters", + args: ["Replace with '.'"], + }, + ], + }, ]); -g \ No newline at end of file