Reverse parser #394

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

Originally created by @LukeTOBrien on GitHub (Aug 7, 2020).

Hello,

I need to do this for a project I'm working on and I just thought I would ask here as I know you guys are helpful and in the chance that there might be a way.
I would like to take an HTML string and convert that string to Markdown.
For eg:
<h3>Heading</h3> to ### Heading
Or more complex:

<ul>
<li>123</li>
<li>abc</li>
</ul>

to

* 123
* abc

Can you think of a way to achieve this?
I was going to do it manually using string manipulation.

Thanks

Luke

Originally created by @LukeTOBrien on GitHub (Aug 7, 2020). Hello, I need to do this for a project I'm working on and I just thought I would ask here as I know you guys are helpful and in the chance that there might be a way. I would like to take an HTML string and convert that string to Markdown. For eg: `<h3>Heading</h3>` to `### Heading` Or more complex: ``` <ul> <li>123</li> <li>abc</li> </ul> ``` to ``` * 123 * abc ``` Can you think of a way to achieve this? I was going to do it manually using string manipulation. Thanks Luke
Author
Owner

@MihaZupan commented on GitHub (Aug 7, 2020):

This is effectively a dupe of #91, see Alexandre's response there https://github.com/lunet-io/markdig/issues/91#issuecomment-277191539

@MihaZupan commented on GitHub (Aug 7, 2020): This is effectively a dupe of #91, see Alexandre's response there https://github.com/lunet-io/markdig/issues/91#issuecomment-277191539
Author
Owner

@LukeTOBrien commented on GitHub (Aug 8, 2020):

Thanks,
I never heard of AngleSharp, I am using HtmlAgilityPack inn my project... I will see what I can do

@LukeTOBrien commented on GitHub (Aug 8, 2020): Thanks, I never heard of AngleSharp, I am using HtmlAgilityPack inn my project... I will see what I can do
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#394