Skip to content

Newlines in multi-line strings in Python code blocks format weirdly; string jumps on top of line #18739

@reivilibre

Description

@reivilibre

Steps to reproduce

  1. Send a Python code block in Element Web. (remove the backslashes from below)
\```python x = """a b""" \``` 
  1. Look at message, see below.

N.B. think the source of this issue is this CSS rule (poked at with dev tools, sorry):

.mx_EventTile_content .markdown-body pre code > * { display: inline-block; }

What happened?

The multiline string sits on top of the line, confusingly.

image

What did you expect?

Changing to this (though there might be side effects, sorry I haven't checked):

.mx_EventTile_content .markdown-body pre code > * { display: inline; }

Gives:
image

Operating system

Linux KDE Neon 20.04

Browser information

Firefox 90.0.2

URL for webapp

https://develop.element.io

Have you submitted a rageshake?

No

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions