Convert MarkdownDocument to plain text Markdown #288

Closed
opened 2026-01-29 14:32:53 +00:00 by claunia · 4 comments
Owner

Originally created by @asbjornu on GitHub (Apr 25, 2019).

Given a successfully constructed MarkdownDocument, how do I convert it to plain text Markdown code?

Originally created by @asbjornu on GitHub (Apr 25, 2019). Given a successfully constructed `MarkdownDocument`, how do I convert it to plain text Markdown code?
Author
Owner

@MihaZupan commented on GitHub (Apr 25, 2019):

You'd essentially be doing what Markdown.Normalize does:
https://github.com/lunet-io/markdig/blob/master/src/Markdig/Markdown.cs#L56-L61

Note that the NormalizeRenderer isn't complete, especially for extensions.

@MihaZupan commented on GitHub (Apr 25, 2019): You'd essentially be doing what `Markdown.Normalize` does: https://github.com/lunet-io/markdig/blob/master/src/Markdig/Markdown.cs#L56-L61 Note that the `NormalizeRenderer` isn't complete, especially for extensions.
Author
Owner

@asbjornu commented on GitHub (Apr 25, 2019):

Thanks! This is related to #155 I suppose. I'll plow ahead and see where I end up.

@asbjornu commented on GitHub (Apr 25, 2019): Thanks! This is related to #155 I suppose. I'll plow ahead and see where I end up.
Author
Owner

@MihaZupan commented on GitHub (Apr 25, 2019):

This is related to #155 I suppose.

Exactly

@MihaZupan commented on GitHub (Apr 25, 2019): > This is related to #155 I suppose. Exactly
Author
Owner

@asbjornu commented on GitHub (Apr 26, 2019):

As I show in #332, I'm using an extension for checklist support and it works just fine with NormalizeRenderer. 🎉

Thanks again, @MihaZupan!

@asbjornu commented on GitHub (Apr 26, 2019): As I show in #332, I'm using an extension for checklist support and it works just fine with `NormalizeRenderer`. 🎉 Thanks again, @MihaZupan!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#288