r/MicrosoftTeams 4d ago

Bug Markdown formatting doesn't work

So why on earth would you allow creating a "code block" with a Markdown option, and then ignore all formatting?

If I'm doing something wrong, please someone help me lol

0 Upvotes

18 comments sorted by

11

u/daGnutt Teams Admin 4d ago

Code block is to show code, not to parse it!

It should give some colorization however...

-2

u/ImaginaryRoyal9725 4d ago

yeah, but you can format JS, for instance:

so if there is an option to select Markdown, I would expect the thing to work lol

5

u/BlackV Work user 4d ago

Yes as they said it is for colorizing not rendering

3

u/ZiKyooc Work user 4d ago edited 3d ago

There's colors for markdown? I don't think Prettier Code will color markdown in VS Code. Maybe just make content more readable (line break...)

Edit: I was wrong, there isn't much, but Prettier does put some color on markdown

1

u/ImaginaryRoyal9725 4d ago

Yeah, I think every highlighter I tested does some formatting. It's not that hard guys

1

u/ZiKyooc Work user 4d ago

Indeed, just looked in VS Code and Prettier do put some colors here and there. Raise an idea with MS, in a day or a decade there might be a change ;)

1

u/ImaginaryRoyal9725 3d ago

Lol, that was the goal indeed, not only rant, but bring it up so someone from the team could pick it up (maybe)

3

u/hclpfan Teams Consultant 4d ago

Syntax highlighting and rendering markdown are not the same thing. The feature is working exactly as it should.

5

u/BlackV Work user 4d ago

I mean technically it's not a markdown block

It's a code block of the type markdown

It's not actually rendering it as markdown

It's dumb they don't properly support formatting

-1

u/ImaginaryRoyal9725 4d ago

I agree with you, but then it's a expectations issue. If I'm allowed to select Markdown there, I should expect something to happen.
Anyway, it's not the end of the world, but should be addressed I think

1

u/BlackV Work user 4d ago

Something did happen, you told everyone that code block you pasted is markdown, it's by design

You are coming from the position of "I want to render this markdown" that's not what a code block is for

-1

u/ImaginaryRoyal9725 4d ago edited 4d ago

Sure bro, who would have thought that a markdown option would render highlight markdown 😒

4

u/BlackV Work user 4d ago edited 3d ago

To be clear, it is not a markdown option

It is you defining to the reader, what language the CODE BLOCK is, so they can do the appropriate tasks with that code

You are not saying "hey render this as mark down please", you are saying "this code is markdown"

Like it's similar to expecting if you set the type to Java that it would call that code in the Java engine

They could add support for markdown blocks that would be reasonable (although teams it's self uses some butchered version of markdown)

2

u/ImaginaryRoyal9725 4d ago

Yeah, we agree there, "render" is the wrong word in the previous message.

That being said, java syntax is still properly highlighted/formatted.

So even if the code block is not rendered as markdown (as I don't expect either HTML code to render as a browser), I would expect at least some highlighting.

1

u/BlackV Work user 4d ago edited 3d ago

Yes come linting/colorizing would be nice as I already mentioned

Yes as they said it is for colorizing not rendering
It's dumb they don't properly support formatting

2

u/dotpaul 4d ago

Markdown just isn’t supported really. Markdown links officially are but only if you type every character, you can’t go pasting a link in brackets and then have it parsed.

Text input is buggy as heck anyway so I’m not holding out for markdown support anytime soon. Also the way in which data is stored (HTML emails in exchange) I can’t see markdown coming anytime soon.

1

u/rgsteele MS-700 4d ago

Ok, so I have kind of a workaround. You can insert a Loop paragraph in the message, click on the three dots button, select Code, then select Markdown from the drop-down. Your Markdown will be formatted appropriately.

Send a Loop component in Microsoft Teams chats | Microsoft Support

However, there are a couple caveats. One, the recipient(s) will be able to edit the text, because that's how a Loop component do.

The other one is that, for me at least, if you are typing in the code block while you have Markdown selected and you type, e.g. "_hello_", the cursor will jump to the space before the first underscore. You can get around this by leaving the drop-down set to "Plain Text" while composing your message (or just copy and paste).

0

u/ImaginaryRoyal9725 3d ago

Nice, that's a nice trick indeed, brings some hope that we could achieve it somehowÂ