- Markdown Tutorial
- Slack Markdown Support
- Slack Markdown Syntax
- Html To Slack Markdown Convert
- Slack Markdown Code
- Slack Post Markdown
Katie Notopoulos, complaining at BuzzFeed about the way Slack now renders text wrapped in tildes (“~like this~”) as strikethrough:
Hi @Xtremefaith. We use here integration with slack posting pretty messages and works very well. You need to use markdown, as you can see here. My suggestion is use a compose action to format your message and use the result of compose in Message Text field, like the prints below, in this case we use ``` ``` to post in slack inside a code block. Can you embed HTML into a Slack post as a way of formatting your messages? However, you can share code snippets using the GUI or by surrounding your entered code with backticks (or triple backticks for multi-line pastes). Ex: `code` or ```code. Can you embed HTML into a Slack post as a way of formatting your messages? However, you can share code snippets using the GUI or by surrounding your entered code with backticks (or triple backticks for multi-line pastes). Ex: `code` or ```code. Here are tips on how to use Markdown formatting in plain text email, so that messages are rendered in a rich text in supporting email clients.
Ok, so this is almost certainly because of Markdown, a tool thatturns text into HTML. In Markdown, putting tildes around a wordmakes it appear as strikethrough text. Using Markdown makes somesense, I ~guess~, since many of Slack’s clients use it for codingand other technical purposes.
But what about the rest of us? Those of us who don’t know shitabout Markdown or coding or who John Gruber is or ~whatever~ man?What about the people who NEED our tildes back so we can actuallycommunicate with each other in the language that is ~native~ toonline discussion???? WHAT ABOUT US???????
There is no strikethrough syntax in Markdown. Go ahead and look at the official syntax. Tildes have no meaning, and are passed through as-is by any good Markdown processor. If Slack didn’t have their heads up their asses and actually used Markdown-style formatting syntax, there’d be no problem. (And we’d get italics instead of bold when we did *this*
, as we should.)
Adding support for a strikethrough syntax is a longstanding request for Markdown, but I omitted it by design. For one thing, there is no good punctuation to represent strikethrough. Tildes don’t look like strikethrough at all — tildes are squiggly, but a strike is a straight line. The most-requested syntax — wrapping the to-be-struck-through text in hyphens, like -this-
— is visually hard to distinguish from dashes used to indicate a pause or parenthetical clause. To me, there is no punctuation that better represents struck-through text than the raw HTML <del>
tag. The primary goal of Markdown is to remain readable as plain text.
For another thing, strikethrough isn’t used frequently enough to justify a shortcut. If Markdown provided its own syntax for all of the various HTML tags that people think that they want, it would be a minefield of special cases that you’d need to be aware of at all times while writing. A big part of Markdown’s (still growing) success is that I kept the syntax relatively small.
Update: Tildes-for-strikethrough comes from the GitHub-Flavored Markdown (which is a Markdown variant I like a lot — I just don’t think the syntax for a programmer-oriented variant is applicable to a general-purpose audience like Slack’s). BuzzFeed has updated Notopoulos’s article accordingly.
★ Thursday, 5 November 2015
Latest versionReleased:
Conservatively convert html to markdown
Project description
Experimental
Purpose: Converts html to markdown while preserving unsupported html markup. The goal is to generate markdown that can be converted back into html. This is the major difference between html2markdown and html2text. The latter doesn’t purport to be reversible.
Information and caveats
Does not convert the content of block-type tags other than <p> – such as <div> tags – into Markdown
It does convert to markdown the content of inline-type tags, e.g. <span>.
Input: <div>this is stuff. <strong>stuff</strong></div>
Result: <div>this is stuff. <strong>stuff</strong></div>
Input: <p>this is stuff. <strong>stuff</strong></p>
Result: this is stuff. __stuff__ (surrounded by a newline on either side)
Input: <span style='text-decoration:line-through;'>strike<strong>through</strong> some text</span> here
Result: <span style='text-decoration:line-through;'>strike __through__ some text</span> here
Except in unprocessed block-type tags, formatting characters are escaped
Markdown Tutorial
Input: <p>**escapeme?**</p> (in html, we would use <strong> here)
Result: **escapeme?**
Input: <span>**escapeme?**</span>
Slack Markdown Support
Result: <span>**escapeme?**</span>
Input: <div>**escapeme?**</div>
Result: <div>**escapeme?**</div> (block-type)
Attributes not supported by Markdown are kept
Slack Markdown Syntax
Example: <a href='http://myaddress'title='clickme'><strong>link</strong></a>
Result: [__link__](http://myaddress 'click me')
Example: <a onclick='javascript:dostuff()'href='http://myaddress'title='clickme'><strong>link</strong></a>
Result: <a onclick='javascript:dostuff()'href='http://myaddress'title='clickme'>__link__</a> (the attribute onclick is not supported, so the tag is left alone)
Changes
0.1.7:
- Improved handling of inline tags.
- Fix: Ignore <a> tags without an href attribute.
- Improve escaping.
0.1.6: Added tests and support for Python versions below 2.7.
0.1.5: Fix Unicode issue in Python 3.
0.1.0: First version.
Release historyRelease notifications | RSS feed
0.1.7
0.1.6.post0
0.1.6
0.1.5
0.1.2
0.1.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Html To Slack Markdown Convert
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size html2markdown-0.1.7.tar.gz (5.3 kB) | File type Source | Python version None | Upload date | Hashes |
Slack Markdown Code
Hashes for html2markdown-0.1.7.tar.gz
Slack Post Markdown
Algorithm | Hash digest |
---|---|
SHA256 | 92baf932c7f216be6d9459a191d45b6401e204bda7a5413febafa875512cfa8c |
MD5 | d066e82ee5f598c6d721dfa0529e2706 |
BLAKE2-256 | ba05666b8105c1c45ee05fcbcb210176c73638710e402b99c5968c5dfdf3c67d |