Skip to content

Commit afec86e

Browse files
Francisco TolmaskyFrancisco Tolmasky
authored andcommitted
Support multiple words in code's language.
Reviewed by @tolmasky.
1 parent dff8e9c commit afec86e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/processor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function preprocess(text) {
8080
var comments = [];
8181
var index, previousNode, comment;
8282

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

0 commit comments

Comments
 (0)