These are sent as files, so we just send a URL, like:
user shared a file: http://someurl.com/slack/media/FILEID
However, text snippets come with a preview_highlight field that has an HTML preview of the text, syntax highlighted. Maybe we can make use of that to send something prettier. However, it must not depend on the receiver's ability to interpret HTML.