Add Markdown Definition List Support #6400

Closed
opened 2025-12-29 19:40:15 +01:00 by adam · 0 comments
Owner

Originally created by @sleepinggenius2 on GitHub (Apr 25, 2022).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.2.1

Feature type

Change to existing functionality

Proposed functionality

I would like to be able to use definition lists within Markdown-rendered fields. This should just require enabling the existing extension as seen here: https://python-markdown.github.io/extensions/definition_lists/.

i.e. This Markdown

Monday - Thursday
:   8am - 5pm
Friday
:   8am - 6pm
Weekend
:   Closed

would render like

<dl>
    <dt>Monday - Thursday</dt>
    <dd>8am - 5pm</dd>
    <dt>Friday</dt>
    <dd>8am - 6pm</dd>
    <dt>Weekend</dt>
    <dd>Closed</dd>
</dl>

Use case

I'm trying to represent the access hours for our sites and this would really help both to visually and semantically represent that data. I already tried using the appropriate HTML tags, but they seem to get stripped. I tested that the default Bootstrap rendering for <dl>, <dt>, and <dd> looks close to the following, but with nicer margins, which would be perfect.

Monday - Thursday
8am - 5pm

Friday
8am - 6pm

Weekend
Closed

Database changes

None

External dependencies

Enable def_list extension of existing Markdown library.

Originally created by @sleepinggenius2 on GitHub (Apr 25, 2022). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.2.1 ### Feature type Change to existing functionality ### Proposed functionality I would like to be able to use definition lists within Markdown-rendered fields. This should just require enabling the existing extension as seen here: https://python-markdown.github.io/extensions/definition_lists/. i.e. This Markdown ```markdown Monday - Thursday : 8am - 5pm Friday : 8am - 6pm Weekend : Closed ``` would render like ```html <dl> <dt>Monday - Thursday</dt> <dd>8am - 5pm</dd> <dt>Friday</dt> <dd>8am - 6pm</dd> <dt>Weekend</dt> <dd>Closed</dd> </dl> ``` ### Use case I'm trying to represent the access hours for our sites and this would really help both to visually and semantically represent that data. I already tried using the appropriate HTML tags, but they seem to get stripped. I tested that the default Bootstrap rendering for `<dl>`, `<dt>`, and `<dd>` looks close to the following, but with nicer margins, which would be perfect. **Monday - Thursday** 8am - 5pm **Friday** 8am - 6pm **Weekend** Closed ### Database changes None ### External dependencies Enable *def_list* extension of existing *Markdown* library.
adam added the status: acceptedtype: feature labels 2025-12-29 19:40:15 +01:00
adam closed this issue 2025-12-29 19:40:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6400