Our application is built on MEAN stack, and recently we have come across an issue that was never a problem.
A code change was made, and Ctrl-M characters are being added automatically. This happens to only one js and html file. All others do not have any problem.
Please find a git diff, below.
new CronJob("01 * * * * *", function () {
- console.log("Notify cron");
+ console.log("Notify Cron");^M
notificationController.notifyCron();
}, null, true, 'America/Los_Angeles');
new CronJob("01 * * * * *", function () {
- console.log("Notify cron");
+ console.log("Notify Cron Message");^M
notificationController.notifyCronMessage();
}, null, true, 'America/Los_Angeles');
Notice that the modified lines have an additional character inserted. I have researched almost everything available on this issue, and there are solutions that allow us to change on the linux server.
But, I would want this to not happen at all. I use Visual Studio Code on macOS...
Any help would be greatly appreciated.