EvitanRelta
EvitanRelta OP t1_j461czu wrote
Reply to comment by djsnipa1 in HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
Ayyy thanks! :D
also, sflr! Do drop the repo an issue or a pull request!
EvitanRelta OP t1_j3ac48y wrote
Reply to comment by seanpuppy in HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
Oh, in the link that u gave, the "align" attribute was transformed to:
{#centered-italicised-heading align="center"}
Is it possible to customise this to instead output as a HTML tag attribute? like:
<h1 align="center">
...
</h1>
what do u mean by "insert markdown into existing markdown"? could u give an example?
EvitanRelta OP t1_j36l6kf wrote
Reply to comment by seanpuppy in HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
Oh have I compared this to Pandoc?
No actually, I've never tried Pandoc before.
I'm not sure if Pandoc can be configured to do the same adaptive-preserving of HTML in markdown, like converting this HTML:
<h1><b>Italicised heading</b></h1>
<h1 align="center">
<i>Centered italicised heading</i>
</h1>
to this markdown:
# _Italicised heading_
<h1 align="center">
<i>Centered italicised heading</i>
</h1>
Anyone here with Pandoc experience who've tried this?
EvitanRelta OP t1_j32la16 wrote
Reply to comment by TomSwirly in HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
Ayy thanks for the star! :D
oh shit ure right, thanks ill correct the description!
EvitanRelta OP t1_j328vdy wrote
Reply to HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
Here's the repo if u wanna check it out or contribute! :D — https://github.com/EvitanRelta/htmlarkdown
You can try it out urself on this demo: https://evitanrelta.github.io/htmlarkdown/
It's my first (hopefully industry-standard) library so I'd love some feedback! (and any contributions, im the only contributor so far so pls send help)
EvitanRelta OP t1_j463a01 wrote
Reply to comment by seanpuppy in HTML-to-Markdown converter that adaptively preserve HTML when needed (eg. when center-aligning, or resizing images) by EvitanRelta
sflr!
Then i guess my converter library has that edge over Pandoc. Specifically, this library can preserve the HTML better than pandoc
So, what im getting is that:
sounds like it can be done by just using a bash script to parse the markdown file, find the headers, and just insert the listitem.
for the nested AST idea, im not sure what itd be useful for.