Skip to content

Commit f5f1162

Browse files
committed
Fix: Ignore anything after space in code fence's language (fixes #99).
1 parent dff8e9c commit f5f1162

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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") {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "eslint-plugin-markdown",
2+
"name": "eslint-plugin-markdown-runkit",
33
"version": "1.0.0-beta.8",
44
"description": "An ESLint plugin to lint JavaScript in Markdown code fences.",
55
"license": "MIT",

0 commit comments

Comments
 (0)