Closed ziming closed 1 year ago
Wouldn't it be just easier to switch the mode to HTML using the options method?
hmm I have never tried html mode. but I have some lines where I intentionally use markdown too.
if i change to html mode i assume I will need to add those ugly html opening and closing tags in my line methods?
hence this approach feels cleaner to me
Please add docs about this in README and create a PR, if possible!
Thanks
Often we pass variables in to the ->line() method, and those variables might contain characters that need to be escaped as Telegram tries to parse the line in markdown
The following example code below will result in a server exception
This PR adds a new method called escapedLine that escape those characters.
For more information see:
https://stackoverflow.com/questions/40626896/telegram-does-not-escape-some-markdown-characters
https://github.com/telegraf/telegraf/issues/1242