# Feature Request: Strikethrough text

**URL:** <https://talk.commonmark.org/t/feature-request-strikethrough-text/220>\
**Category:** Extensions\
**Created:** [September 4, 2014, 7:12am UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220 "2014-09-04T07:12:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![voodoo](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/voodoo/32/140_2.png) [@voodoo](https://talk.commonmark.org/u/voodoo)\
**Post date:** [September 4, 2014, 7:12am UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/1 "2014-09-04T07:12:21Z")

</div>

I cannot see this functionality in the spec. The HTML output would obviously be `<del></del>`

---

<div class="post-metadata">

**Author:** ![riking](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/riking/32/23_2.png) [@riking](https://talk.commonmark.org/u/riking)\
**Post date:** [September 4, 2014, 7:34am UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/2 "2014-09-04T07:34:48Z")

</div>

Here’s a draft of an extension to do that, in the format I’ve been throwing around:

> ### Extension: Strikethrough

> A new inline Markdown element is added, Strikethrough. It follows the same parsing rules as strong emphasis (§6.4), except that the asterisk and underline are replaced by a tilde `~`, and the `<strong>` tag is replaced with the `<del>` tag.
> 
> A double `~~` can open strikethrough iff
> 
> 1. it is not part of a sequence of 3 or more unescaped `~`s, and
> 2. it is not followed by whitespace.
> 
> A double `~~` can close strikethrough iff
> 
> 1. it is not part of a sequence of 3 or more unescaped `~`s, and
> 2. it is not preceded by whitespace.
> 
> Strikethrough has a precedence equal to emphasis and strong emphasis.

---

<div class="post-metadata">

**Author:** ![voodoo](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/voodoo/32/140_2.png) [@voodoo](https://talk.commonmark.org/u/voodoo)\
**Post date:** [September 4, 2014, 7:58am UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/3 "2014-09-04T07:58:20Z")

</div>

OK. I think `~` is better than `-` that is used in for instance in JIRA (_-some deleted text-_) as it is a less common character used in general language.

---

<div class="post-metadata">

**Author:** ![jan](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jan/32/172_2.png) [@jan](https://talk.commonmark.org/u/jan)\
**Post date:** [September 4, 2014, 11:28am UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/4 "2014-09-04T11:28:18Z")

</div>

A very nice feature indeed, and available in [Trello](http://trello.com): [https://trello.com/c/lzWiUQYd/1496-add-strikethrough](https://trello.com/c/lzWiUQYd/1496-add-strikethrough)

---

<div class="post-metadata">

**Author:** ![Zegnat](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zegnat/32/182_2.png) [@Zegnat](https://talk.commonmark.org/u/Zegnat)\
**Post date:** [September 4, 2014, 2:06pm UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/5 "2014-09-04T14:06:55Z")

</div>

That extension draft looks really interesting, but I have to ask, do you have a matching draft for the `ins` element? It seems strange to implement only half of what is needed to “represent edits to the document” (as the HTML Standard [describes `ins` and `del`](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#edits)).

Unless you are not really talking about actual edits but only a way to mark text as “no longer accurate or no longer relevant”, in which case [the `s` element](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-s-element) should be used.

Has anyone (@riking) considered how [CriticMarkup](http://criticmarkup.com/) would work together with SMD? They have addition and deletion covered, which would open-up `~~` for use with the `s` element for an actual HTML strikethrough equivalent.

---

<div class="post-metadata">

**Author:** ![zwol](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zwol/32/63_2.png) [@zwol](https://talk.commonmark.org/u/zwol)\
**Post date:** [September 4, 2014, 3:47pm UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/6 "2014-09-04T15:47:40Z")

</div>

Yeah, I was just going to say, this is more useful if paired with a syntax for `<ins>`. `++new text++` maybe?

---

<div class="post-metadata">

**Author:** ![riking](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/riking/32/23_2.png) [@riking](https://talk.commonmark.org/u/riking)\
**Post date:** [September 4, 2014, 5:38pm UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/7 "2014-09-04T17:38:24Z")

</div>

My intent was to come up with something that describes how Reddit and GitHub currently do strikethrough – in other words, to describe what’s already happening (just like the rest of the spec).

On GitHub, strikethrough uses the `<del>` tag so I used that here, too.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/codinghorror/32/2_2.png) [@codinghorror](https://talk.commonmark.org/u/codinghorror)\
**Post date:** [November 21, 2014, 9:16pm UTC](https://talk.commonmark.org/t/feature-request-strikethrough-text/220/8 "2014-11-21T21:16:30Z")

</div>

Duplicate of

[http://talk.commonmark.org/t/strikeout-threw-out-strikethrough-strikes-out-throughout/820](http://talk.commonmark.org/t/strikeout-threw-out-strikethrough-strikes-out-throughout/820)

This topic is now closed. New replies are no longer allowed.
