Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A message to bot gets formatted before being sent #7

Open
OleksiyRudenko opened this issue Jun 5, 2019 · 2 comments
Open

A message to bot gets formatted before being sent #7

OleksiyRudenko opened this issue Jun 5, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@OleksiyRudenko
Copy link
Owner

OleksiyRudenko commented Jun 5, 2019

Android mobile Telegram client Plus (native client not confirmed) employs markdown formatting. The message gets parsed and formatted, and special char sequences are stripped out before being sent to a bot.

So, the message e.g. /js let a=5; `The number is ${a}` is sent as /js let a=5; The number is ${a} causing SyntaxError: Unexpected identifier

@OleksiyRudenko OleksiyRudenko added the bug Something isn't working label Jun 5, 2019
@khode-mohsen
Copy link

try "{0}{1}".format(a,b)

@OleksiyRudenko
Copy link
Owner Author

Possible workaround: enclose entire message into a pair of triple backticks.
Single backticks work as well but triplets are required to quote multiline instructions.
Probably, latest telegram updates fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants