mautrix / discord

A Matrix-Discord puppeting bridge
https://go.mau.fi/mautrix-discord
GNU Affero General Public License v3.0
253 stars 21 forks source link

Fix inline code bridging from matrix to discord #45

Closed baltitenger closed 1 year ago

baltitenger commented 1 year ago

Previously, text inside inline code blocks got escaped unnecessarily, showing up as surplus backslashes on discord. This (mostly) fixes this, but it still breaks when the code block contains consecutive backticks. I'm not sure if there's a fix for that, except for the case when it only contains groups of 2 backticks, in which case sending foo``bar would work but this special case is not handled at the moment. (code blocks that only contain lone backticks do get sent properly)

Related: #37