Why do backticks work for highlighting code in Discord, but Armenian commas don't?

Solution 1:

I faced the same thing when I edited your question. This:

```py
print("hello world!")
```

renders as:

print("hello world!")

whereas this:

՝՝՝py
print("hello world!")
՝՝՝

renders as:

՝՝՝py print("hello world!") ՝՝՝

While the characters for designating code fences are similar to the eye, they are different for your apps. The backtick character (`) has the Unicode representation of U+0060, while the Armenian comma (՝) has the Unicode representation of U+055D, as you said.

The code formatting here and in Discord uses some flavor of Markdown, for which backtick U+0060 characters have a special meaning (are used for highlighting code), while the Armenian comma U+055D character has no special meaning. That makes your text correctly highlighted when using backticks and printed just as you wrote it when using Armenian commas.