Generate markdown, not parsing it #624

Closed
opened 2026-01-29 14:41:24 +00:00 by claunia · 1 comment
Owner

Originally created by @unruledboy on GitHub (Sep 1, 2023).

Hi,

Sorry for the ignorance here, I did some research by looking at the tests, the related issues and I could not find how to "generate" markdown rather than parsing it and converting it to HTML.

For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose?

public class Product
{
    public string Category { get; set; }
    public string Name { get; set; }
    public decimal Price { get; set; }
}
| Category | Name | Price |
| ------------- | ------------- | ------------- |
| Computer | ThinkPad X1 Carbon | 2999.99  |
| Mobile Phone | iPhone 15 Pro Max | 1899.99  |

Thanks,
Wilson

Originally created by @unruledboy on GitHub (Sep 1, 2023). Hi, Sorry for the ignorance here, I did some research by looking at the tests, the related issues and I could not find how to "generate" markdown rather than parsing it and converting it to HTML. For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose? ```csharp public class Product { public string Category { get; set; } public string Name { get; set; } public decimal Price { get; set; } } ``` ```markdown | Category | Name | Price | | ------------- | ------------- | ------------- | | Computer | ThinkPad X1 Carbon | 2999.99 | | Mobile Phone | iPhone 15 Pro Max | 1899.99 | ``` Thanks, Wilson
claunia added the question label 2026-01-29 14:41:24 +00:00
Author
Owner

@xoofx commented on GitHub (Sep 1, 2023):

For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose?

We don't support such scenario. The intermediate Markdown AST could be built manually to output such thing... but It has never been designed with such a goal and so, it would be very cumbersome to use it as is.

@xoofx commented on GitHub (Sep 1, 2023): > For example, I have some POCOs, like below, and I would like to convert those POCOs to markdown. Is markdig the right tool for purpose? We don't support such scenario. The intermediate Markdown AST could be built manually to output such thing... but It has never been designed with such a goal and so, it would be very cumbersome to use it as is.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#624