Discobot 和复制粘贴 markdown

When interacting with the discobot, if replying with a copy&pasted command that the discobot instructed to do, it’s possible to inadvertently copy the markdown style rendering it ineffective, even if it looks the command is right.

This should illustrate the problem well:

A detail that may make this hard to reproduce or perhaps even to fix: this only happens if selecting the command with the space just before it. If selecting just from the @ it pastes without style. This is on Chrome on a Mac.

I realize this is quite an edge case. The reason I’m reporting it is because we now got two different people stumbling on this in our community. Besides being bewildering for them, it also wastes staff time since it’s not immediately obvious what is causing it from just looking at the messages — it just looks like discobot doesn’t reply.

If fix for this isn’t obvious or trivial, probably not worth pursuing — leaving it here anyway as it may help others figure out an unresponsive discobot.

3 个赞

:thinking: I guess one could modify the https://your.domain/admin/customize/site_texts?q=discobot appropriate texts by adding something along the line of “be careful with the `` if you copy/paste” ?

2 个赞

We have members from all over the world, so I wouldn’t be able to translate it all the languages used by Discourse.

Also, most in our community are not very tech savvy and if they are still doing the tutorial, talking about markdown delimiters when copy&pasting is more likely to confuse more people than help the few that may hit this issue.

2 个赞

The easiest solution would be strip markdown and show @discobot… at new line alone.

Yes, tech savvy will cry bloody tears when theirs eyes are melting, but more normal people are totally happy :wink:

That is what we ae using with e-commerce when tehre is urls, download links etc…

So, if markdown is not hardcoded but is showing in text I would replace backticks with <p></p> or <br /> tags.

这是因为当你复制粘贴某些内容时,它会复制与之关联的 markdown、HTML 和 BBCode,这是我喜欢的一个功能。
也许可以这样做:
回复此消息并输入

@discobot start advanced tutorial

以了解更多高级功能!

当然,你也可以在站点设置中进行更改。