Closed apie08 closed 7 months ago
Hi @apie08
I think you need to escape the slash when using double quotes, or replace the double quotes by single quotes.
So, try this:
npx mudslide send me "Hello \\nWorld"
Or:
npx mudslide send me 'Hello \nWorld'
This is my code. I'm using C# to open CMD and run the command.
But it's not working when using single quotes. I have tried it
I think this is a C# specific problem, I've just checked npx mudslide send me 'hello\nworld'
and npx mudslide send me "hello\\nworld"
in the shell and that works fine.
Escaping characters for sub-processes can be tricky, maybe you need \\\\n
for it to work but I'm not sure. I'm not using C# myself so can't help you more with this issue.
Or is it because node js version? because I'm using veesion 16
Problem solved. Solution is node JS version is not version 18 or latest. Thank you
Great to hear! I'm closing this issue then 🙂
Why after I execute the command with new line, I got "\" after that?
Example :
npx mudslide send me "Hello \nWorld"
Return:
Hello \ World