md-to-pdf icon indicating copy to clipboard operation
md-to-pdf copied to clipboard

Add support for using markdown-it instead of marked

Open danishcake opened this issue 1 year ago • 5 comments

markdown-it is the markdown parser used by Visual Studio Code, so using it grants access to a rich ecosystem of plugins.

resolves #313

danishcake avatar Sep 12 '24 05:09 danishcake

Found that the id tags created for headers differed from those created by marked, which might catch people out, if they expect markdown-it to be a drop-in replacement.

This should be fixed

danishcake avatar Sep 17 '24 05:09 danishcake

Wow thanks a lot for this! Spending a month in New Zealand so I was traveling for the last few days... I'll try to go through it this week or next. Also still need to update marked like 10 major versions 😅

Regarding header IDs I would say let's stick with the markdown-it default even if it differs from marked, and rather add a note in the readme that they are different (and add the config instructions for changing it to make it the same as marked).

simonhaenisch avatar Sep 20 '24 22:09 simonhaenisch

To be clear before I start wading into the code base: We want the default markdown-it behaviour, which is to not assign header IDs at all. If so, that's fair.

Enjoy New Zealand - here in the UK it's raining non-stop.

danishcake avatar Sep 23 '24 04:09 danishcake

Sry I haven't had any time to review this yet. I haven't forgotten about it though 🙃

simonhaenisch avatar Oct 22 '24 07:10 simonhaenisch

Hey @danishcake sry it's been so long, i started reviewing it today! (looks good so far, thanks ❤️)

simonhaenisch avatar Nov 04 '24 09:11 simonhaenisch