Strikethrough formatting on markdown fields not working #5509

Closed
opened 2025-12-29 19:28:49 +01:00 by adam · 3 comments
Owner

Originally created by @rmblake on GitHub (Oct 12, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.0.7

Feature Type

Change to existing functionality

Proposed Functionality

In any markdown-supporting textbox:

Currenty the '~~' for strikethrough isn't parsed, in as in the example below. It turns out that Markdown is a far more controversial topic than I had expected, other products such as docuwiki
![image](https://user-images.githubusercontent.com/2751074/136980053-8e52e5b1-747b-4a23-bcc5-694b4f6cd0ff.png

As stated by Jeremy in the comments this is down to the fact that the Python Markdown library only supports the original 'official' markdown syntax, which has been extended with the strikethrough/tilde feature by many other implementations, github being one of the more notable cases.

Use case

Our example use case is that currently we use netbox's journal function to log any issues with circuits, including tickets raised - in this example our supplier reissued a new problem ticket reference for a long-suffering DSL with a new reference and we wanted a way to make it clear that the existing ticket reference was no longer valid.

Database Changes

I do not believe there would be any changes to the database structure as part of this feature request.

External dependencies

As netbox uses the python markdown library, an obvious suggestion for a further dependency (as already made by @tb-killa in comments) would be the tilde extension of the pymdown-extensions library

Originally created by @rmblake on GitHub (Oct 12, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.0.7 ### Feature Type Change to existing functionality ### Proposed Functionality In any markdown-supporting textbox: * When surroundin text with '~~' marks as described in the markdown cheat sheet as hinted below the free text field https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet, ~~strikethrough~~. Currenty the '~~' for strikethrough isn't parsed, in as in the example below. It turns out that Markdown is a far more controversial topic than I had expected, other products such as docuwiki ![image](https://user-images.githubusercontent.com/2751074/136980053-8e52e5b1-747b-4a23-bcc5-694b4f6cd0ff.png As stated by Jeremy [in the comments](https://github.com/netbox-community/netbox/issues/7531#issuecomment-941180489) this is down to the fact that the Python Markdown library only supports the original 'official' markdown syntax, which has been extended with the strikethrough/tilde feature by many other implementations, github being one of the more notable cases. ### Use case Our example use case is that currently we use netbox's journal function to log any issues with circuits, including tickets raised - in this example our supplier reissued a new problem ticket reference for a long-suffering DSL with a new reference and we wanted a way to make it clear that the existing ticket reference was no longer valid. ### Database Changes I do not believe there would be any changes to the database structure as part of this feature request. ### External dependencies As netbox uses the python markdown library, an obvious suggestion for a further dependency (as already made by @tb-killa in comments) would be the [tilde extension](https://facelessuser.github.io/pymdown-extensions/extensions/tilde/) of the [pymdown-extensions library](https://github.com/facelessuser/pymdown-extensions)
adam added the status: acceptedtype: feature labels 2025-12-29 19:28:49 +01:00
adam closed this issue 2025-12-29 19:28:49 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 12, 2021):

This is not a bug in NetBox. Python's Markdown library, which NetBox employs to render Markdown, doesn't support strikethrough markup. I believe this decision was made because strikethrough is not part of the official Markdown syntax declaration. More context can be found here. (The cheat sheet you linked seems to be for GitHub's proprietary GFM extensions.)

If you'd like to explore options for extending NetBox's Markdown support via an extension, please rewrite your issue above in the form of a feature request (or open a new issue). Thanks!

@jeremystretch commented on GitHub (Oct 12, 2021): This is not a bug in NetBox. Python's [Markdown library](https://github.com/Python-Markdown/markdown), which NetBox employs to render Markdown, doesn't support strikethrough markup. I believe this decision was made because strikethrough is not part of the [official Markdown syntax declaration](https://daringfireball.net/projects/markdown/syntax). More context can be found [here](https://github.com/Python-Markdown/markdown/issues/221). (The cheat sheet you linked seems to be for GitHub's proprietary GFM extensions.) If you'd like to explore options for extending NetBox's Markdown support via an extension, please rewrite your issue above in the form of a feature request (or open a new issue). Thanks!
Author
Owner

@tb-killa commented on GitHub (Oct 15, 2021):

As mentioned this need an FR but this would be one extension: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/

@tb-killa commented on GitHub (Oct 15, 2021): As mentioned this need an FR but this would be one extension: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
Author
Owner

@rmblake commented on GitHub (Oct 15, 2021):

Thanks both - The original request has been rewritten to fit the feature request template for now.

@rmblake commented on GitHub (Oct 15, 2021): Thanks both - The original request has been rewritten to fit the feature request template for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5509