Skip to content

sable doesn't like <code class="language-*"> #1610

Description

@poolcritter

Describe the bug

sable renders <code> elements with a language-* (i.e. that would be syntax-highlighted) as plaintext.

Reproduction

send “<code class="language-scala">println("awa")</code>”

Expected behavior

sable should show println("awa") in monospace, ideally syntax-highlighted (as Fluffy does)

Platform and versions

- OS: Linux x86_64
- Browser: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
- Sable: v1.20.0-dev (e3e1d57)

Additional context

sable:
Image

fluffychat:
Image

{
  "body": "lazy val intlit: PP[Int] = radix.flatMap(rd => PP.feast(Character.digit(_, rd) != -1).collect(Function.unlift(dx => Integer.parseInt(dx, rd).tryNumbers))) is perfectly comprehensible smh",
  "com.beeper.linkpreviews": [],
  "format": "org.matrix.custom.html",
  "formatted_body": "<code class=\"language-scala\">lazy val intlit: PP[Int] = radix.flatMap(rd =&gt; PP.feast(Character.digit(_, rd) != -1).collect(Function.unlift(dx =&gt; Integer.parseInt(dx, rd).tryNumbers)))</code> is perfectly comprehensible smh",
  "m.mentions": {
    "user_ids": [
      "@gimmechocolate:bark.lgbt"
    ]
  },
  "msgtype": "m.text"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions