diff --git a/lib/processor.js b/lib/processor.js index 113b289a..8ded5d41 100644 --- a/lib/processor.js +++ b/lib/processor.js @@ -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") {