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 -
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.
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.
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.
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.
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.
لا أدعم تغيير Nokogiri؛ وإذا اضطررنا إلى ذلك بسبب شكاوى متعددة من العملاء، فيمكننا تنقية هذه العناصر بحيث يتطابق المعاين، أو فتح أخطاء في Chrome وFirefox.
أعتذر للجميع عن كوني متشددًا بشأن هذا الأمر، ولكن:
الناس السهلون يتكيفون مع بيئتهم، بينما الناس الصعبون يصرّون على أن تتكيف بيئتهم معهم. لذلك، يمكن إرجاع كل تقدم بشري، من ترويض النار، والعجلة، والأهرامات، والبنسلين، … وصولاً إلى دفع الإلكترونات عبر نفق كمي لتوفير تخزين SSD، إلى الناس الصعبين!