Closed ghost closed 7 years ago
How to replace BR code globally to \n using .replace(/BR/g, '\n') ?
By using the botmaster-watson-conversation-ware, I could make the FB bot with Watson,
But I can not find the way to replace all the BR globally to \n in the watson output text which will be given to users.
Is it related with the 'update.watsonUpdate.output.text' ?
Thanks,
P.S. Since the BR code is just applied in this example so I change the real BR code to just BR so please check the issue title.
Using update.watsonUpdate.output.text[i].replace(//g, '\n'), the issue has been solved.
How to replace BR code globally to \n using .replace(/BR/g, '\n') ?
By using the botmaster-watson-conversation-ware, I could make the FB bot with Watson,
But I can not find the way to replace all the BR globally to \n in the watson output text which will be given to users.
Is it related with the 'update.watsonUpdate.output.text' ?
Thanks,
P.S. Since the BR code is just applied in this example so I change the real BR code to just BR so please check the issue title.