A standard feature in Markdown is the ability to strike-through text. However, when I strike through in the Stack Overflow with standard syntax, nothing happens:
- Actual:
~~An example of strike-through text~~
- Expected:
Why?
In order to reach the desired result, I have to use the HTML syntax:
<s>An example of strikethrough text</s>
Which is far more verbose and not universally reliable. Worse yet strike-through is undocumented despite other HTML features being documented, meaning a user unfamiliar with Markdown might think they are doing something wrong!
This is already a feature in the following parsers:
- GFM
- ExtraMark
- MultiMarkdown
- Pandoc
- Markua
- Remarkable
- Showdown
- Ghost
- GitHub
- GitLab
- Redcarpet
- Trello
- s9e\TextFormatter
How is this useful to Stack Overflow users
- To show comparison:
You're using the wrong command change
tonpm run dev
npm run start
- It removes something out of date or deprecated:
universal-fs
does not support usage without a password(in version 1.2 you can use universal-fs without a password)
Accessibility
As mentioned by LW003 usage of the strike
tag can cause site wide problems for accessibility. Adding an official way to do this with Markdown and removing the ability to use the strike
tag.
Which implementation should be used
CommonMark does not specify an implementation, which leaves it open to many options.
There are 2 ways most markdown flavours handle this:
~~text~~
{--text--}
I think the best option is 1 for the following reasons:
- It requires the least amount of syntax
- The character
~
carries the meaning NOT in formal logic and some programming languages - It is hard to confuse with other markdown symbols
Additionally, this new feature will require documentation. I propose we add this documentation under strike-through in markdown help. We can phrase along the lines of:
~~An example of strikethrough text~~
In conclusion
Adding strike-through will be another reason to not need HTML in posts and make an overall better experience.
<strike></strike>
is deprecated/obsolete in HTML. Instead, use<del></del>
for deleted content, or<s></s>
in all other cases. B) Please explain what you mean by using HTML for<strike></strike>
is "not universally reliable". Do you mean browsers don't support it. If so, see (A) above.<strike></strike>
is documented (but should be changed to<s></s>
). See the in-page help that's available by clicking the "?" at the top of the editor and click on "HTML". Admittedly, it's not also on the page you've linked. However, that page does link to "What HTML tags are allowed on Stack Exchange sites?", which is a comprehensive list. It's not reasonable to have that help page have a comprehensive list of all supported HTML along with explanations for each. You need to make a case for why<s></s>
should be on that page.<s>
B) It is not universally available as in not available in the comment/staging ground editor C) Once again I missed that. However, I still think strikethrough as a basic piece of formatting a poster may take for granted in a rich text editor like TinyMCE. Therefore an effort should be made to highlight how a user can use it.<strike>
or<del>
or<s>
tags. And in the end, you haven't shown what having this available would actually provide. Could you provide a use-case where this kind of markup would make sense, and not be simply a distraction/harmful?