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.
Desde mi punto de vista, funciona en el navegador debido a un comportamiento inesperado del navegador, no a una característica de HTML; el elemento strike no está diseñado para abarcar divs y párrafos.
Entendido. Y si el grupo Nokigiri implementa esta solicitud de función, eventualmente se filtrará a Discourse. Así que, ¿puedo tener la salida de:
nokogiri -v
por favor? Tengo que agregarla a la descripción del error, tal como lo solicitaron tú y Nokigiri, porque desde la perspectiva de un usuario final, esto ahora parece un engaño en Discourse:
No apoyo el cambio de Nokogiri; si es necesario debido a múltiples quejas de clientes, podemos sanitizar estos elementos para que la vista previa coincida, o abrir incidencias en Chrome y Firefox.
@sam Como se acordó en la conversación fuera de línea, se abrió un problema en nokogiri, quien nos indicó que en realidad es CRuby quien utiliza libxml2.
Por lo tanto, se abrió un nuevo problema en libxml2 para que eventualmente sea incorporado por nokogiri, y así Discourse y @alexs@codinghorror@mattman@Mittineague@riking puedan ser personas más felices para que el tachado funcione en múltiples líneas.
Mis disculpas a todos por ser tan pedante al respecto, pero:
Las personas fáciles se adaptan a su entorno, mientras que las personas difíciles insisten en que su entorno se adapte a ellas. Por lo tanto, todo el progreso humano, desde la domesticación del fuego, la rueda, las pirámides, la penicilina, … hasta forzar electrones a través de un túnel cuántico para darnos almacenamiento SSD puede atribuirse a las personas difíciles!