16

The Teachers' Lounge has a chatbot with a whois function listing moderators for a specific site. The response is in italics, but it's a Markdown message, and moderator names with an underscore at the end like 'ow_' cause the formatting to break:

a transcript example of the bot's feeback

Here is the Markdown equivalent of both messages, which is hopefully clear enough to indicate why this bug happens:

I'm aware of 2 moderators on opendata.stackexchange.com: Nicolas Raoul, Pluviophile. None of them are currently in this room.


I’m aware of 3 moderators on datascience.stackexchange.com: oW, Stephen Rauch, Ben Reiniger. None of them are currently in this room._

When moderators are present in the room, their name is bolded with double asterisks, which could cause additional formatting problems, but I haven't investigated that in detail.

4
  • 2
    Asterisks also give italics. Are asterisks allowed in usernames? If not, the fix could be as simple as re-coding the bot to post the message *like this* instead of _like this_. Commented Oct 14, 2022 at 17:48
  • One way to fix it is to just have it put a line break in the message, so the message renders as plain text. Commented Oct 14, 2022 at 17:52
  • 3
    @Randal'Thor you asked for it; I'm going to try to append an asterisk to your username </jk>
    – Glorfindel Mod
    Commented Oct 14, 2022 at 18:06
  • 1
    Did a bit of testing in regular chat - a slightly cludgy solution might be to 'seperately' wrap the user names in formatting. - chat markdown only reads the 'outer' markdown formats - so having the fixed parts of the string wrapped in underscores and the usernames 'seperately' in underscores might help
    – Journeyman Geek Mod
    Commented Oct 16, 2022 at 4:25

0

You must log in to answer this question.

Browse other questions tagged .