Score:-3

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

kz flag

When I send code in Discord using this:

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

it appears in a box with code highlighted as you can see in the picture below. However, when I use Unicode U+055d (Armenian comma) for the code fences (՝՝՝ ՝՝՝) :

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

and send it, the code doesn't get highlighted. It also does not appear in the box as you can see in the picture.

enter image description here

wjandrea avatar
cn flag
For more info, in Unicode these are called "confusables" and there's tons of them. Here's an [official demo page](https://util.unicode.org/UnicodeJsps/confusables.jsp?a=%60&r=None). Some others are `ˋ`‵``. My favorites are the Cyrillic letters like `а` and `р` cause they look *exactly* like the Latin letters in most fonts.
in flag
Is there any application where Armenian commas do work for formatting code? Why would they?
Guntram Blohm avatar
cn flag
If you press `ALT-96` in windows, you get a backtick, which has an ascii code of 96, or 60 hex; not an armenian comma.
Score:16
ca flag

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.

eg flag
There is a visible difference between backtick and Armenian comma. Edit: - on this device (PC, chrome, win11). Your mileage may differ.
BeastOfCaerbannog avatar
ca flag
It depends on the font used and the font rendering. When I see this thread from my phone, the difference is clear. However, when I read it from my PC, both look almost the same.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.