Skip to content

CSS: Markdown code blocks are rendered with wrong padding #17064

Closed
@jsenecal

Description

@jsenecal

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.10

Steps to Reproduce

  1. Set any comment field to include the following markdown:
First line
\```
first code block line
second code block line
third code block line
\```

(Remove the backslashes '\')
2. Click on preview, or save the form.
3. Notice that fist code block line is not aligned with the following lines when rendered

Expected Behavior

All the code block lines should be aligned

Observed Behavior

The first line is padded properly but the remaining lines are more to the left, as if there was no padding:
image

The Tabler CSS for markdown code blocks is unaltered in NetBox with regards to padding (padding: 2px 4px;) and the issue is also visible when live editing their demo using chrome inspect, albeit less evident in some of the examples due to their font choices:
image

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions