revite icon indicating copy to clipboard operation
revite copied to clipboard

bug: Using double exclamation marks spoilers even if the next character is a space

Open carro179 opened this issue 7 months ago • 3 comments

What happened?

When talking, using double exclamation marks spoilers even if the next character is another exclamation mark or a space. For example, in the message "I am really excited!! I really liked this event!!!", the second half would be spoilered and the exclamation marks would be missing, save for the last one.

I've seen other sites with the same behavior, but they usually use symbols like || to spoiler, so this isn't a problem. Here is the problem happening with the phrase "test!! test!!" and "test!!! test!!!" Image

carro179 avatar May 09 '25 18:05 carro179

seems to only occur on app.revolt.chat, which is based on https://github.com/revoltchat/revite

here is a screenshot of the issue happening on app.revolt.chat spoiler issue present

here is a screenshot of the issue not happening in a local environment running the following commit hash 30abe9801eaac3268a8fe0df04b4987acd7d734d spoiler issue not present

CodeF53 avatar May 28 '25 22:05 CodeF53

https://github.com/revoltchat/revite/blob/9e293e0a30a991838a9fbbc4a488417f824022da/src/components/markdown/plugins/spoiler.tsx#L45

I'm guessing the source of the trouble is here? Judging by the regex.

alexjyong avatar May 29 '25 00:05 alexjyong

Related, the Android app is using the new frontend repo right? Doesn't look like spoilers work there.

Edit: never mind I see it's on the road map 🤦‍♂️

Image

alexjyong avatar May 29 '25 00:05 alexjyong