npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 71 forks source link

Add support for JSX syntax highlighting in code blocks #396

Closed revin closed 7 years ago

revin commented 7 years ago

This will add support for highlighting JSX code blocks, once highlights#55 is merged upstream.

Fixes #395

revin commented 7 years ago

Marking as WIP for now since this is waiting on getting a version number from the highlights package.

zeke commented 7 years ago

waiting on getting a version number from the highlights package.

Can you elaborate on what this means? Maybe I can help unblock.

revin commented 7 years ago

@zeke highlights doesn't support JSX yet, so I submitted a PR for it: https://github.com/atom/highlights/pull/55

Once that's merged, I can get the version number they publish, and fix up our dependencies here to match.

bcoe commented 7 years ago

@zeke @revin I've published highlights@next, would love you to take it for a spin and make sure it works as expected.

It would be good to also add a test for TypeScript, since we also landed this feature; once you're happy @revin I can work with you sometime soon to role the renderer out to npm.

revin commented 7 years ago

Turns out (which I forgot) that upgrading to highlights@^3 ends up breaking on node 4 because a transitive dependency uses JS Proxy. So it looks like we're stuck for now unless we decide to retire node 4 support.

@bcoe @ashleygwilliams thoughts?

revin commented 7 years ago

Looks like node 4 is EOL in April 2018. Just IMHO, personally I feel like JSX and TypeScript support are probably in more demand than node 4 is, over the next 9 months. Only a hunch though, not supported by data.

bcoe commented 7 years ago

the rendering service we're running at npm uses Node 6; I think we should land this, but bump the major -- adding support for JSX is huge.

bcoe commented 7 years ago

(will do so once tests pass).