pablo-abc / svelte-markdown

Markdown parser to svelte components
MIT License
359 stars 50 forks source link

chore: update marked to 4.0.7 #32

Closed Raicuparta closed 2 years ago

Raicuparta commented 2 years ago

I was having trouble installing svelte-markdown with pnpm, and it was due to the old marked dependency version. So I updated the dependency to the latest version.

Table parsing had a breaking change, so I had to modify that part. Maybe the variable names could be improved. See here for the relevant changelog: https://github.com/markedjs/marked/releases/tag/v3.0.0

Also had to change the way Lexer and Slugger are imported/exported from. marked. Not sure if there's an issue with this way of doing it, but it seems to work well.

Tests are passing, and I also tested it in my own website which reads GitHub markdown from a bunch of repos. All of the ones listed here seem to be working fine (that url isn't currently using svelte-markdown, but I tested locally with the same samples).

pablo-abc commented 2 years ago

This looks great! Seems this is no longer compatible with Node 10 (and no reason to support this here at all, tbh). Can you remove that from .github/workflows/tests.yml so the tests can run here?

Raicuparta commented 2 years ago

Done

pablo-abc commented 2 years ago

@Raicuparta published in v0.2.0!