Skip to content

Add Markdown Definition List Support #9221

@sleepinggenius2

Description

@sleepinggenius2

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.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions