You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a recipe is loaded in node using the "Find / Replace" operation, it is not found!
To Reproduce
In the Web UI generate a recipe using the "Find / Replace" operation
Save the recipe (as JSON, clean or compact does not matter)
in Node load the saved recipe
const recipe = [
{"op": "Find / Replace","args": [{"option": "Simple string","string": "test"},"good",true,false,true,false]}
];
chef.bake("I'll have the test salmon.", recipe);
Expected behaviour
output: "I'll have the good salmon"
Additional context
The problem appears to be in the difference of how the generateNodeIndex.mjs creates the list of operations and how the apiUtils.mjs::sanatise function cleans the operation names. Obviously the decapatialize function used in generateNodeIndex.mjs outputs a name that is not a valid variable name in node ("find/Replace"), but it appears that gets fixed somewhere (perhaps manually?? idk)
One possible simple solution is to change the sanatise function to also include the "/" character as follows:
export function sanitise(str) {
return str.replace(/[\/ ]/g, "").toLowerCase();
}
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
When a recipe is loaded in node using the "Find / Replace" operation, it is not found!
To Reproduce
Expected behaviour
output: "I'll have the good salmon"
Additional context
The problem appears to be in the difference of how the generateNodeIndex.mjs creates the list of operations and how the apiUtils.mjs::sanatise function cleans the operation names. Obviously the decapatialize function used in generateNodeIndex.mjs outputs a name that is not a valid variable name in node ("find/Replace"), but it appears that gets fixed somewhere (perhaps manually?? idk)
One possible simple solution is to change the sanatise function to also include the "/" character as follows:
The text was updated successfully, but these errors were encountered: