npm / marky-markdown

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

Syntax highlighting fails for type JavaScript (CamelCase) even though it works on Github #433

Open jhsware opened 6 years ago

jhsware commented 6 years ago

When identifying a code block as JavaScript with uppercase 'J' and 'S', the highlighting doesn't kick in as expected. The highlighting works fine on Github, which means it is easy to miss until after a release.

The work around is to change the language identifier to javascript (lowecase). Still, it is reasonable to expect it to be compatible with Github given that NPM supports Github flavoured markdown.

Here is an example (difference is apparent in source):

CamelCase WON'T be highlighted on NPM:

import 'marky-markdown'

Lowercase WILL be highlighted on NPM:

import 'marky-markdown'