Pamasich, (edited )
Pamasich avatar

So, slight correction to my previous post (which I now deleted) thanks to @troplin.

It seems that phrasing content like <span> elements are allowed inside <pre> elements according to the spec, so Lemmy is actually doing the right thing there. It's on kbin to fix this, not Lemmy.

I commented on one of the closed issues about this on the kbin code repository, asking for the issue to be reopened. Hopefully it will so this gets fixed, I'm not sure though how visibility works if the issue is already closed. I'll make a new one if it's neither reopened nor replied to until next week, if no one else does first.

adam,
@adam@kbin.pieho.me avatar

The issue here is that Lemmy is federating out it's content with the pre blocks containing rendered code fit for some sort of code display plugin/CSS - which KBin doesn't have.

It would ideally send out the blocks html encoded and would let downstream implementations like KBin or others figure out how to display it themselves. I don't know how we would fix this.

Pamasich, (edited )
Pamasich avatar

deleted_by_author

  • Loading...
  • troplin,

    I think Lemmy is correct here and the Mozilla docs only refer to the text content, not elements. It also mentions that < and > still have to be escaped to be displayed.

    The HTML spec https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element defines that the element contains „phrasing content“ which <span> is part of.

    It even explicitly mentions nesting <code> inside <pre>.

    Pamasich,
    Pamasich avatar

    You're right, I only read the beginning of article, the Mozilla docs also mention the phrasing content later on the same page.

    Guess it's really on kbin then to fix this.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinMeta
  • kavyap
  • thenastyranch
  • cubers
  • ethstaker
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • GTA5RPClips
  • JUstTest
  • khanakhh
  • normalnudes
  • osvaldo12
  • cisconetworking
  • provamag3
  • Durango
  • tacticalgear
  • modclub
  • Leos
  • megavids
  • tester
  • anitta
  • lostlight
  • All magazines