Issues with strikethrough <s> HTML5 tag

AI-generated summary

jomaxro reported a bug in Discourse 1.5.0.beta9 where using the <s> HTML5 tag to strikethrough multiple paragraphs results in inconsistent behavior between the preview pane and the final baked post. While the preview correctly applies strikethrough to all text between the opening and closing tags, the published post only strikes through the first paragraph. The user provided reproduction steps involving blank lines separating paragraphs and confirmed the issue on their instance but noted it works as expected on the beta version of try.discourse.org. 2 asked if the issue persists on the standard markdown-it demo site. jomaxro confirmed that the markdown-it library handles the multi-paragraph strikethrough correctly, suggesting the issue lies within Discourse’s specific implementation or configuration of the parser rather than the library itself. A screenshot was attached to illustrate the discrepancy between the editor view and the submitted post.

Summary:

Using <s> </s> tags with multiple paragraphs produces inconsistent results in the preview pane versus a baked post.

Steps to reproduce:

  1. Create multiple paragraphs with blank lines separating them
  2. Add <s> in front of first paragraph
  3. Add ` at end of second (or later) paragraph

Expected Results:

All text between <s> and </s> is striked out

Actual Results:

Preview pane shows expected results. Only first paragraph in baked (submitted) post is striked out.

Notes:

I was able to replicate this on try.discourse.org, however try is a beta ahead (10) of stonehearth. See post below:
https://try.discourse.org/t/testing-strikethrough/340?u=jomaxro

Attachments:

Screenshot of post editor and submitted post on try.

Version:

Discourse 1.5.0.beta9 (discourse.stonehearth.net)
Discourse 1.5.0.beta10 (try.discourse.org)

System Information:

Windows 10 Pro, Chrome Stable 48

إعجابَين (2)

What happens here: https://markdown-it.github.io/ ?

It works as expected there. 3 paragraphs with strikethrough.

Permalink to github.io