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’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.
A mio avviso, funziona nel browser a causa di un comportamento imprevisto del browser, non di una funzionalità HTML: il tag strike non è inteso per attraversare div e paragrafi.
Compreso. E se il gruppo Nokigiri implementerà questa richiesta di funzionalità, alla fine arriverà anche a Discourse. Quindi posso avere l’output di:
nokogiri -v
per favore, dato che devo aggiungerlo alla descrizione del bug come richiesto da te e da Nokigiri, perché dal punto di vista dell’utente finale ora sembra un cambio di rotta in Discourse:
Non sono a favore della modifica di nokogiri; se fosse necessario a causa di molteplici segnalazioni da parte dei clienti, possiamo sanificare questi elementi in modo che l’anteprima corrisponda, oppure aprire bug su Chrome e Firefox.
@sam Come discusso offline, è stato aperto un issue su nokogiri, che ci ha comunicato che in realtà è CRuby a utilizzare libxml2.
Di conseguenza, è stato aperto un nuovo issue su libxml2 in modo che, in futuro, la correzione venga integrata in nokogiri, e poi in Discourse, permettendo a @alexs@codinghorror@mattman@Mittineague@riking di essere tutti più felici perché l’effetto barrato funziona su più righe
Mi scuso con tutti per essere così pedante riguardo a questo, ma:
Le persone facili si adattano al proprio ambiente, mentre le persone difficili insistono affinché sia l’ambiente ad adattarsi a loro. Pertanto, tutto il progresso umano, dall’addomesticamento del fuoco, della ruota, delle piramidi, della penicillina… fino alla forzatura degli elettroni attraverso un tunnel quantistico per ottenere archiviazione SSD può essere attribuito alle persone difficili!