# Multi-Line Strikethrough Not Covering Quotes

**URL:** https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808
**Category:** Support
**Created:** [June 20, 2017, 12:43pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808 "2017-06-20T12:43:40Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [June 20, 2017, 12:43pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/1 "2017-06-20T12:43:40Z")

</div>

I’m not sure whether this bug is specific to Discourse but when I try to strikethrough several lines of text & one of those lines is a quote, the quote’s text is not struck out.

The preview displays the quoted text as struck out -

 ![](https://global.discourse-cdn.com/meta/original/3X/5/4/54cf8ea3da26ac54f428baa73ec923e9303422cb.png)

but when posted, it renders like this -

 ![](https://global.discourse-cdn.com/meta/original/3X/d/f/df5df71544f6332d49dc7725799bc5ee056dee2c.png)

Striking out each line instead like this -

 ![](https://global.discourse-cdn.com/meta/original/3X/1/1/1168e66d06c4efe3683746397b1c099984559c39.png)

does behave as I was expecting -

 ![](https://global.discourse-cdn.com/meta/original/3X/f/7/f7e4b6ac4d5183aac8a4ad0ba02882c5c869631e.png)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 20, 2017, 1:11pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/2 "2017-06-20T13:11:48Z")

</div>

You should really try that example at [https://markdown-it.discourse.org](https://markdown-it.discourse.org)

As that is the site testing implementing the common mark spec into Discourse.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 20, 2017, 1:19pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/3 "2017-06-20T13:19:09Z")

</div>

Works fine in Markdown.it

 ![](https://global.discourse-cdn.com/meta/original/3X/f/7/f72eb269704d4d689c131d84bff01488ce308128.png)

---

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [June 20, 2017, 1:41pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/4 "2017-06-20T13:41:04Z")

</div>

I’m still having the same issue in Markdown.it, in your example you haven’t got struck out text before the quote but in mine, I have -

 ![](https://global.discourse-cdn.com/meta/original/3X/8/d/8d94c03152171f64e2e9378c642372edfff3eec9.png)

looks like

 ![](https://global.discourse-cdn.com/meta/original/3X/8/1/819fe5a50dd09536b4afbccb54a85f0031cc8371.png)

From this topic -

[https://markdown-it.discourse.org/t/testing-multi-line-strikethrough-with-quotes/90](https://markdown-it.discourse.org/t/testing-multi-line-strikethrough-with-quotes/90)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 20, 2017, 1:43pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/5 "2017-06-20T13:43:34Z")

</div>

Looks like nokogiri may be messing stuff up, I will investigate.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 20, 2017, 9:28am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/6 "2017-07-20T09:28:47Z")

</div>

Let’s see

~~Some text~~

~~ 

> a quote

 ~~

raw

```
<s>Some text

> a quote

</s>

```

This still happens.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 20, 2017, 11:26am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/7 "2017-07-20T11:26:31Z")

</div>

Strike is an inline, not a block level element, I may just add a rule to balance inline tags

---

<div class="post-metadata">

### Author: ![mattman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattman/32/119713_2.png) [@mattman](https://meta.discourse.org/u/mattman)
#### Post date: [July 28, 2018, 1:16am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/8 "2018-07-28T01:16:22Z")

</div>

So this is still a thing. The preview is different from the final product.

 ![discourse%20preview%20right%20save%20wrong](https://global.discourse-cdn.com/meta/original/3X/6/e/6e077dd7f590996707a6aa8edfecc02f46c4d67d.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 28, 2018, 1:56am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/9 "2018-07-28T01:56:25Z")

</div>

Simple workaround, use strikethrough as a _line_ not block element.

Rather than expecting this to work

```
<s>
hey
> there
</s>

```

Strikethrough each line instead

```
<s>hey</s>
> <s>there</s>

```

~~hey~~

> ~~there~~

---

<div class="post-metadata">

### Author: ![mattman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattman/32/119713_2.png) [@mattman](https://meta.discourse.org/u/mattman)
#### Post date: [July 28, 2018, 1:59am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/10 "2018-07-28T01:59:23Z")

</div>

Thanks, but I wasn’t asking for a work around. I was pointing out that this bug still exists. It’s weird that the preview gets it right but the actual render doesn’t.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 28, 2018, 2:00am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/11 "2018-07-28T02:00:34Z")

</div>

It’s unlikely we will be “fixing” this bug anytime soon, so plan accordingly 😉

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [July 28, 2018, 2:53am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/12 "2018-07-28T02:53:59Z")

</div>

I’m not so sure this is a bug. Phrasing content can’t be expected to work well with Flow content that is not itself Phrasing content. eg. `<div>` or `<p>` tags.

> **[3.2.5.2.2 Flow content - HTML Standard](https://html.spec.whatwg.org/multipage/dom.html#flow-content)**
>
> Living Standard — Last Updated 1 June 2026

> **[3.2.5.2.5 Phrasing content - HTML Standard](https://html.spec.whatwg.org/multipage/dom.html#phrasing-content)**
>
> Living Standard — Last Updated 1 June 2026

What would be required is to parse the single opening and closing `<s>` tags to multiple tags within the parent Flow content elements.

IMHO, that is most likely a bit much for something that is edge case and has an existing workaround.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 28, 2018, 5:06am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/13 "2018-07-28T05:06:45Z")

</div>

What’s happening is the browser is applying an age-old fix by copying the `<s>` onto each paragraph until the close tag. The server uses Nokogiri which does not _Reconstruct the active formatting elements_ but instead inserts a close tag for the strikethrough at the end of paragraph, as you would for any non-formatting mis-nested tag.

It’s officially specified as applying to `a, b, big, code, em, font, i, nobr, s, small, strike, strong, tt, and u.`

See [https://html.spec.whatwg.org/multipage/parsing.html#misnested-tags:-b-i-/b-/i:reconstruct-the-active-formatting-elements](https://html.spec.whatwg.org/multipage/parsing.html#misnested-tags:-b-i-/b-/i:reconstruct-the-active-formatting-elements)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 28, 2018, 6:25am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/14 "2018-07-28T06:25:39Z")

</div>

I am not against somebody submitting a patch nokogiri that works around this issue, or gives it a mode where it is able to handle it and we use it.

But I am moving this to feature … cause technically you provided bad HTML, if anyone is passionate about this raise it on the CommonMark site or Nokogiri bug tracker.

---

<div class="post-metadata">

### Author: ![Fabby](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fabby/32/170928_2.png) [@Fabby](https://meta.discourse.org/u/Fabby)
#### Post date: [January 28, 2020, 9:28pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/15 "2020-01-28T21:28:24Z")

</div>

Here’s the Nokogiri bug filed on your behalf [as per your request](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/14?):

[https://github.com/sparklemotion/nokogiri/issues/1975](https://github.com/sparklemotion/nokogiri/issues/1975)

Could you please come back to me with the output of `nokogiri -v` as that’s what the developers over there need.

I feel like a human SMTP server forwarding messages between 2 servers who are **definitely not talking to one another**

😜 🤪

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 28, 2020, 10:18pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/16 "2020-01-28T22:18:46Z")

</div>

The way I see it, it works in the browser due to a browser quirk, not an HTML feature, strike is not meant to span divs and paragraphs

---

<div class="post-metadata">

### Author: ![Fabby](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fabby/32/170928_2.png) [@Fabby](https://meta.discourse.org/u/Fabby)
#### Post date: [January 28, 2020, 10:24pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/17 "2020-01-28T22:24:27Z")

</div>

Understood. 😇 And if the Nokigiri group implements this feature request, this will eventually dribble down to Discourse. So can I have the:

```
nokogiri -v 

```

output please as I have to add this to the bug description as per your and Nokigiri’s request because from an end-user perspective this now looks like a bait-and-switch in discourse:

 ![Screenshot_20200128_220054](https://global.discourse-cdn.com/meta/original/3X/0/8/0834deac32770a4d400b8404d7630c08d94c3a9c.png)

(Please note the preview and final output)

😭

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 28, 2020, 10:26pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/18 "2020-01-28T22:26:17Z")

</div>

I don’t support changing nokogiri, if we must due to multiple customer complaints, we can sanitize these elements so preview matches, or open bugs with chrome and Firefox

---

<div class="post-metadata">

### Author: ![Fabby](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fabby/32/170928_2.png) [@Fabby](https://meta.discourse.org/u/Fabby)
#### Post date: [January 28, 2020, 10:31pm UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/19 "2020-01-28T22:31:59Z")

</div>

🤔

Sanitizing preview input is acceptable too:

- at least it’s consistent from a UI perspective.
- It’s not what I _want_, but it’s something _I’ll have to live with…_

😁 😇

Enough ~~dumb~~ end-user interaction for the day: I’ll let you get back to more important things like _actual development_… 😉

---

<div class="post-metadata">

### Author: ![Fabby](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fabby/32/170928_2.png) [@Fabby](https://meta.discourse.org/u/Fabby)
#### Post date: [January 31, 2020, 3:40am UTC](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808/20 "2020-01-31T03:40:37Z")

</div>

@sam As per off-line discussion, issue was opened with [nokogiri](https://github.com/sparklemotion/nokogiri/issues/1975), who told us it’s actually CRuby which is using libxml2.

Therefore a new issue was [opened over at libxlm2](https://gitlab.gnome.org/GNOME/libxml2/issues/144) so that eventually it’ll get pulled in by nokogiri, then discourse and @alexs @codinghorror @mattman @Mittineague@riking can all be happier people for ~~strikethrough to work over multiple lines~~

My apologies to everyone to be so pedantic about this but:

_Easy people adapt themselves to their environment, whereas difficult people insist their environment adapts to them. Therefore, all human progress, from the taming of fire, the wheel, the pyramids, penicilline, … up to forcing electrons down a quantum tunnel to give us SSD storage **can be attributed to difficult people!** _

😁 😉

[Next page](https://meta.discourse.org/t/multi-line-strikethrough-not-covering-quotes/64808.md?page=2)
