element-hq / element-hq/element-web

Code blocks inside spoiler tags are displayed incorrectly

Open
#28,685 3 comments 0 reactions 0 assignees View on GitHub
A-Markdown O-Uncommon S-Minor T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

Writing `/spoiler` and then inserting ` ``` ` right after, then the code in multiple lines and then ` ``` ` again in its own line yields some weird reformatting, that definitely does not what we are looking for.

Also the following command does not yield a proper code block:
```html
/html

fn main() {

println!("Hallo Alex!");
}

```

### Outcome

I expect code blocks inside spoiler tags to correctly highlight and display the line numbers inside the code block.
There should also be a way to nest a code block inside a spoiler tag without needing to type the HTML manually.

### Operating system

Arch Linux

### Browser information

Firefox 132.0.2

### URL for webapp

_No response_

### Application version

_No response_

### Homeserver

matrix.org

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.