Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Slack does not support syntax highlighting of code blocks.

It does, but only if you make your code block into its own post as a "text snippet." (I assume this is because Slack's internal markup doesn't allow regions to have parameterized metadata, but there is parameterized metadata at the chat-post-event level.)

You also get other benefits of doing this, e.g. being able to collapse the snippet, download it, etc. Code pasted into Slack should really always be pasted as a snippet. I just wish it auto-detected you were trying to do that and offered to make a snippet.



Yeah, I have done that. It’s really clunky. I’ve also done it to be able to use headings and other things that I’d prefer just worked in the main chat.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: