Support for underline and strikethrough? #74

Closed
opened 2026-01-29 14:25:10 +00:00 by claunia · 2 comments
Owner

Originally created by @markau on GitHub (Dec 7, 2016).

Sweet library. I am using a very simplistic implementation just to convert basic markdown to html for display on a page.

I am not sure our users will even need this feature, but I noticed some markdown is not being rendered as expected; in this case underline (++) and strikethrough (~~).

image

I don't know if these are strictly valid markdown tags or not, so this might not actually be an issue with markdig. I thought I would raise it anyway. Cheers!

Originally created by @markau on GitHub (Dec 7, 2016). Sweet library. I am using a very simplistic implementation just to convert basic markdown to html for display on a page. I am not sure our users will even need this feature, but I noticed some markdown is not being rendered as expected; in this case underline (++) and strikethrough (~\~). ![image](https://cloud.githubusercontent.com/assets/3004849/20963453/52c29c14-bcbd-11e6-9991-2ae2333db18e.png) I don't know if these are strictly valid markdown tags or not, so this might not actually be an issue with markdig. I thought I would raise it anyway. Cheers!
claunia added the question label 2026-01-29 14:25:10 +00:00
Author
Owner

@xoofx commented on GitHub (Dec 7, 2016):

They are already supported (check also babelmark + markdig advanced)

In order to use them, you need to activate the proper extension on the markdown pipeline:

var pipeline = new MarkdownPipelineBuilder().UseEmphasisExtras().Build();
var result = Markdown.ToHtml(input, pipeline);
@xoofx commented on GitHub (Dec 7, 2016): They are already [supported](https://github.com/lunet-io/markdig/blob/master/src/Markdig/MarkdownExtensions.cs#L364) (check also [babelmark + markdig advanced](https://babelmark.github.io/?text=This+is+a+%2B%2Bunderline%2B%2B+and+~~strikethrough~~)) In order to use them, you need to activate the proper extension on the markdown pipeline: ```csharp var pipeline = new MarkdownPipelineBuilder().UseEmphasisExtras().Build(); var result = Markdown.ToHtml(input, pipeline); ```
Author
Owner

@markau commented on GitHub (Dec 7, 2016):

Ahh, thanks for pointing this out @xoofx !

(And I see strikethrough in the README, oops...!)

@markau commented on GitHub (Dec 7, 2016): Ahh, thanks for pointing this out @xoofx ! (And I see strikethrough in the README, oops...!)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#74