Skip to content

Commit

Permalink
Support multiple words in code's language.
Browse files Browse the repository at this point in the history
Reviewed by @tolmasky.
  • Loading branch information
Francisco Tolmasky authored and Francisco Tolmasky committed Oct 10, 2018
1 parent dff8e9c commit afec86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function preprocess(text) {
var comments = [];
var index, previousNode, comment;

if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.toLowerCase()) >= 0) {
if (node.lang && SUPPORTED_SYNTAXES.indexOf(node.lang.split(" ")[0].toLowerCase()) >= 0) {
index = parent.children.indexOf(node) - 1;
previousNode = parent.children[index];
while (previousNode && previousNode.type === "html") {
Expand Down

0 comments on commit afec86e

Please sign in to comment.