-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
If you have a code fence like this:
```javascript more stuff
5 + 5
```Most markdown interpreters simply ignore everything after the space and treat the syntax coloring based only on the first part. For example, if you view the source of this very comment, you'll see that the code fences below is "javascript test" and not just "javascript". This is very useful because it allows one to provide additional functionality. In particular, on the node site we are going to have javascript runkit to turn on "runnability" on certain code blocks ( nodejs/node#22831 ). The fix is very simple, just changing:
if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.toLowerCase()) >= 0) {to:
if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.split(" ")[0].toLowerCase()) >= 0) {I'm happy to submit this change but wanted to run it by everyone here first.
vsemozhetbyt, Trott and sagirk