MS Teams latest update code snippet shortcut gone

Copper Contributor

Hey,

 

I have noticed in the latest team update you cannot do 3 backticks ``` anymore as a shortcut for a code snippet box. You can start ` and end ` with a backtick but this only works for one line of code, which isn't very useful.

 

I know you can still do it the long clicky way by going to the format box and clicking "code snipppet etc" but this is extremely annoying to do 20 times per day.

 

Does anyone know if there is a new shortcut for this?

 

 

 

18 Replies
Same issue. Seems odd to have been changed from the universal ``` format if they changed it. My guess is it's a bug.
Have your reported it?

@cakehead123 Yes, through the feedback mechanism in the app. 

Sweet, I will too, let me know if you find anything out?

@cakehead123 try adding a space after the 3 back ticks. 

Try adding a space after the three backticks, that fixed the issue for me.
Just came back to say I accidentally discovered the space thing and that does work for me. Silly.

@jared52 

the space worked for me too, but the formatting/spacing isn't maintained... ughhhh... why?! So frustrating!

for me three backspaces followed by a whitespace does not work,

 

But monospaced in the Teams Area is working...

Monospaced in the Chat Area is not working...

 

Using Code Snippet is working in both...

As the others have reported, the ``` works flawlessly only in a Teams channel. It does not work in a chat. The ``` followed by a space does sort of work, but spacing is not preserved like it is in a Teams channel. It just looks horrible in chat. I noticed that it works in the Web App in both chat and channels like it's supposed to. None of my colleagues have this issue, it's just me for some reason. I got a new machine too, and the problem followed me. Wonder if it's tied to my profile somehow.

@cakehead123 

its now available by default, just after the insert link 

check that symbol for code snippet... </>
code_snippet.png

@fahimchy hi, thanks.

 

As stated in my original post though, I know this, but this is highly inconvenient compared to the old shortcut, especially when pasting bits of code tens of times a day

Is there a way to report the bug? It's very frustrating

@cakehead123 Try add space after tripled tick - it works then.

That doesn't work for me. It shows the snippet box when I do that, but it doesn't preserve the spacing of the source text, so the text can appear misaligned. I paste a lot of code snippets and these all appear misaligned for me.
Great find thank you, now I can't figure out how to end the snippet and go back to normal text without posting and going to a new post, really silly

@fahimchy I don't see why I would want to use a mouse in order to type a code block. This seems like a regression more than a feature. Using a graphical menu gets really clunky when going back and forth in a chat.  We used to be able to quickly discuss code and log messages using markdown notation. If language selection is desired, this is supported by standard markdown without a menu. However, in a chat context, no one is trying to make anything pretty. Usually one just wants monospaced fonts and some indicator that the code is part of a block separate from the discussion.