Backticks don't work with pasted text
If I copy something like a class name or error message, and then I go teams and type backtick, Ctrl-V, backtick, the pasted text does not get formatted like code. However, if I backspace after pasting and retype the last character and then add the backtick, code formatting works as expected.
Eric Staples commented
I ran into the opposite problem today. I copied a function name from my IDE and pasted it into teams and, without any backticks, it seemed to detect that what I pasted was code, which it then erroneously formatted into a code block for me... not the inline code I intended. There were no carriage returns or new lines included in the copied text, yet there it was, a code block, staring back at me with impudence. It was difficult to reformat it into inline code as once there's a code block, there's no easy way out of it. Sure, you can shift+enter+enter your way back into paragraph format, but then you're still stuck with a code block.
One workaround to turn it into inline code is to add an extra space after the cursor position where the pasted text will go, which opens up a nice, clean exit back into paragraph format.
Joel Day commented
Hey Teams, learn to use Bing to find libraries: https://github.com/markedjs/marked
Frank Lazzarini commented
I experienced the same issue.
Steps to reproduce:
* Copy some text to the clipboard
* Go to teams to the `Type a new message` field
* Start writing a message and hit backtick to start pre formated text
* Next paste the text you copied earlier
* and close pre formating with another backtick
Teams doesn't pre-format the pasted text altough it is surrounded by backticks
* Paste text including surrounding backticks (You will have to prepare the text to be pasted first)
* Edit the sent message and remove the backticks and set them again
* Paste text first and set backticks after text has been pasted.
Owen Scott commented
This seems like a specific incident of the more general issue: Teams' on-the-fly Markdown parsing is really, really broken. Microsoft - could you please fix that, by stopping with automated parsing and leaving Markdown syntax in place, and then watch this entire long-tail of bugs melt away?