я создаю чат-бота в узле js и могу получить ответ
Но ссылки также отображаются в виде текста. я хочу отображать их как ссылки
responseText = `You want to learn about ${agent.parameters.course}.
Here is a link to the course: ${coupon.link}`;
Мне нужна помощь в преобразовании текста ссылки в HTML
я пробовал это `` `
responseText = `You want to learn about ${agent.parameters.course}.
Here is a link to the course: ` + `<a href='${coupon.link}'>${coupon.link}</a>`;
but this is not working .Response i am getting from chatbot is
You want to learn about chatbots. Here is a link to the course: <a href='https://www.udemy.com/user/jana-bergant'>https://www.udemy.com/user/jana-bergant</a>
**Is there any way of parsing the string (use regular expression) and when you find a link in the string, add the html tag (<a href="...) around it.?
**