SOLVED
Home

Pasting a code snippet inside ticks doesn't format as a code snippet

%3CLINGO-SUB%20id%3D%22lingo-sub-809182%22%20slang%3D%22en-US%22%3ERe%3A%20Pasting%20a%20code%20snippet%20inside%20ticks%20doesn't%20format%20as%20a%20code%20snippet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809182%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F393774%22%20target%3D%22_blank%22%3E%40chaws%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3ETry%20this%20-%20when%20going%20to%20post%20the%20message%3CBR%20%2F%3E%3CBR%20%2F%3E1.)%20Select%20format%20(A%20icon%20with%20brush)%20underneath%3CBR%20%2F%3E2.)%20Select%20ellipsis%20(...)%3CBR%20%2F%3E3.)%20Select%20Code%20Snippet%20()%3CBR%20%2F%3E4.)%20Copy%20and%20paste%20in%20there%3CBR%20%2F%3E5.)%20Post%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20that%20answers%20your%20question!%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%20Chris%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-809201%22%20slang%3D%22en-US%22%3ERe%3A%20Pasting%20a%20code%20snippet%20inside%20ticks%20doesn't%20format%20as%20a%20code%20snippet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809201%22%20slang%3D%22en-US%22%3EI%20see%20this%20as%20more%20of%20a%20workaround%20than%20a%20fix%20to%20the%20UX%20bug.%20Thanks%20for%20this%20info%20though!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-809327%22%20slang%3D%22en-US%22%3ERe%3A%20Pasting%20a%20code%20snippet%20inside%20ticks%20doesn't%20format%20as%20a%20code%20snippet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809327%22%20slang%3D%22en-US%22%3ENo%20problem!%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20feel%20that%20it%E2%80%99s%20more%20of%20a%20bug%20with%20the%20desktop%20client%20then%20please%20feel%20free%20to%20raise%20it%20through%20one%20of%20these%20channels%20-%3CBR%20%2F%3E%3CBR%20%2F%3E1.%20In%20a%20ticket%20to%20Microsoft%3CBR%20%2F%3E2.%20On%20the%20bug%20section%20at%20Uservoice%20here%20-%20%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F908686-bug-reports%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F908686-bug-reports%3C%2FA%3E%3CBR%20%2F%3E3.%20Or%20I%20now%20believe%20you%20can%20send%20a%20report%20through%20the%20desktop%20client%20in%20the%20Help%20section.%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20that%20answers%20your%20question%3CBR%20%2F%3E%3CBR%20%2F%3EBest%2C%20Chris%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-809146%22%20slang%3D%22en-US%22%3EPasting%20a%20code%20snippet%20inside%20ticks%20doesn't%20format%20as%20a%20code%20snippet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-809146%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20teams%20if%20I%20type%20%60foo%60%20the%20output%20is%20formatted%20as%20a%20code%20snippet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20instead%20of%20typing%20the%20code%20snippet%2C%20I%20paste%20the%20code%20snippet%20(i.e.%20%60%5Bctrl%2Bv%5D%60)%20the%20value%20is%20not%20formatted%20as%20a%20code%20snippet.%20To%20get%20around%20this%2C%20I%20have%20to%20type%20%60%5Bctrl%2Bv%5D%5Bspace%5D%60%5Bbackspace%5D%20which%20seems%20like%20a%20bug.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20if%20I%20type%20two%20ticks%20(i.e.%20%60%60)%20and%20then%20paste%20code%20between%20the%20two%20ticks%2C%20it%20is%20also%20not%20formatted%2C%20even%20if%20I%20hit%20space.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-809146%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUser%20Interface%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
chaws
New Contributor

Hi,

 

In teams if I type `foo` the output is formatted as a code snippet.

 

If instead of typing the code snippet, I paste the code snippet (i.e. `[ctrl+v]`) the value is not formatted as a code snippet. To get around this, I have to type `[ctrl+v][space]`[backspace] which seems like a bug.

 

Also, if I type two ticks (i.e. ``) and then paste code between the two ticks, it is also not formatted, even if I hit space.

 

Thanks!

3 Replies
Hi @chaws

Try this - when going to post the message

1.) Select format (A icon with brush) underneath
2.) Select ellipsis (...)
3.) Select Code Snippet (</>)
4.) Copy and paste in there
5.) Post

Hope that answers your question!

Best, Chris
I see this as more of a workaround than a fix to the UX bug. Thanks for this info though!
Solution
No problem!

If you feel that it’s more of a bug with the desktop client then please feel free to raise it through one of these channels -

1. In a ticket to Microsoft
2. On the bug section at Uservoice here - https://microsoftteams.uservoice.com/forums/908686-bug-reports
3. Or I now believe you can send a report through the desktop client in the Help section.

Hope that answers your question

Best, Chris
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies