markdown syntax not rendering consistently in comments #11556

Closed
opened 2025-12-29 21:46:42 +01:00 by adam · 1 comment
Owner

Originally created by @ghost on GitHub (Sep 2, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.7

Python Version

3.10

Steps to Reproduce

  1. Create a module type
  2. Add comments to module type

Example:

**Part Numbers:**
* JTK7F, X1KR4

**Compatible with:**
* PowerEdge C6520, C6525, R650, R6525, R750, R7525

Expected Behavior

Markdown syntax should render the same for all. bullet points, new lines, etc.

Observed Behavior

Markdown syntax is not rendering the same for 2 headings, even though they have the exact same syntax.

I've tried adding double spaces after the bolded text, which should make the next bullet line be on the next line. However, as you can see from the screenshots, if you do double spaces after the bolded headings, but make the bulleted line on the next line, the bullet points are no longer respected.

but if you skip a line, the bullet points are now respected, but the first heading skips a line when the 2nd heading doesn't. makes no sense.

This:
Image

Generates This:
Image

And this:
Image
Generates this:

Image
Originally created by @ghost on GitHub (Sep 2, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.7 ### Python Version 3.10 ### Steps to Reproduce 1. Create a module type 2. Add comments to module type Example: ``` **Part Numbers:** * JTK7F, X1KR4 **Compatible with:** * PowerEdge C6520, C6525, R650, R6525, R750, R7525 ``` ### Expected Behavior Markdown syntax should render the same for all. bullet points, new lines, etc. ### Observed Behavior Markdown syntax is not rendering the same for 2 headings, even though they have the exact same syntax. I've tried adding double spaces after the bolded text, which should make the next bullet line be on the next line. However, as you can see from the screenshots, if you do double spaces after the bolded headings, but make the bulleted line on the next line, the bullet points are no longer respected. but if you skip a line, the bullet points are now respected, but the first heading skips a line when the 2nd heading doesn't. makes no sense. This: <img width="631" height="246" alt="Image" src="https://github.com/user-attachments/assets/42707852-34ff-4fb7-9048-edf1aac3fe20" /> Generates This: <img width="563" height="199" alt="Image" src="https://github.com/user-attachments/assets/66e84bf0-230d-4b28-a4dc-66ea0c233aa4" /> And this: <img width="618" height="230" alt="Image" src="https://github.com/user-attachments/assets/d31769e0-46e0-404a-95c2-0227ec65759a" /> Generates this: <img width="592" height="195" alt="Image" src="https://github.com/user-attachments/assets/b4f04072-df03-4cef-802c-8c456153367a" />
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:46:42 +01:00
adam closed this issue 2025-12-29 21:46:42 +01:00
Author
Owner

@jnovinger commented on GitHub (Sep 2, 2025):

Thanks for the bug report, @rcon-git . Looking at this, the proper markdown syntax is in fact the same as your example comment input.

It looks like this is due to a CSS rule on the last paragraph in a <div class="rendered-markdown">...</div>. This makes sense, when the last paragraph is the last item in the comment, but not much sense when there are other, non-<p> items after it.

@jnovinger commented on GitHub (Sep 2, 2025): Thanks for the bug report, @rcon-git . Looking at this, the proper markdown syntax is in fact the same as your example comment input. It looks like this is due to a CSS rule on the last paragraph in a `<div class="rendered-markdown">...</div>`. This makes sense, when the last paragraph is the last item in the comment, but not much sense when there are other, non-`<p>` items after it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11556