Ripcord Dev Logo Ripcord Development — View Ticket Login or Create Account
Ticket UUID: d723607cccbec32c99cd2c20ece519be733b41ec
Title: Code Block displayed as a syntax key when it's not valid
Status: Closed Type: Bug
Severity: Minor Priority: Low
Subsystem: Discord Resolution: Rejected
Last Modified: 2019-12-22 04:36:21
Version Found In: 0.42.1
Astrid2019-12-21 11:51:59

Currently, most if not all multi-line code blocks have their entire first line of text displayed at a lower contrast. I understand this is done to display the code syntax key, but this has become a noticeable problem. I think it might have been a recent change on their side, because Ripcord has not updated in a while, and I don't remember this being an issue.

One very simple trick at detecting that the first line is absolutely not a syntax key is that it contains more than one word, as their site script reports all ~170 registered languages all use a single word for their key.

I only see this as a pressing issue as the chosen font colour for this line makes any text much harder to read

cancel2019-12-22 04:36:21

The reason it doesn't try to do anything like see if there is a space-equivalent character in the "language name" location is to prevent this from being misleading to Ripcord users who are sending messages. I do not want to make any assumptions about what the web client does or does not do. It could change in the future and leave Ripcord in a state where users are misled about the contents of messages.

The Discord web client frequently screws stuff up and displays bad or weird parse results. I don't want to try to replicate the behavior of Discord's web client every week as they change it. Parsing of arbitrary user text input over the internet is dangerous and difficult. I am not going to make weekly changes to the chat text parser in Ripcord. The amount of testing that I have to do each time, and the risk involved with screwing it up, are much greater considerations than some minor cosmetic thing like is being described here.

If you find something more serious, though, let me know.