-
-
Couldn't load subscription status.
- Fork 23
Open
Description
I've been thinking that perhaps we can use goldmark's AST as a middleground for converting HTML to MD.
- Parse HTML using
net/html - Walk through the tree and convert it into a goldmark ast node
- Use https://github.com/Kunde21/markdownfmt to convert from GoldmarkAST to markdown text.
I've been working on converting a different format into markdown, this method has been quite smooth as far as I can parse to AST correctly.
I was thinking that we could do a similar thing for HTML. Bonus point is that it'll make it easier to extend and support many markdown flavours and extensions. GFM is already covered.
This will likely be a breaking change since something like setting custom options will no longer work the same way.
If you think it makes sense I could work on it once I have less work on my hands.
Metadata
Metadata
Assignees
Labels
No labels