EvitanRelta

EvitanRelta OP t1_j463a01 wrote

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:

  • u want to make a tasklist app
  • that stores the notes in markdown
  • with an commandline function that inserts a string as a list item under a specific header

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.

1

EvitanRelta OP t1_j3ac48y wrote

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?

1

EvitanRelta OP t1_j36l6kf wrote

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?

3

EvitanRelta OP t1_j328vdy wrote

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)

2