Allow [class] selectors in hyperscript as per 6b2750e

This commit is contained in:
Barney Carroll 2016-11-19 18:06:12 +00:00
parent 6b2750ea59
commit fbee0a5c1a
2 changed files with 3 additions and 2 deletions

View file

@ -112,7 +112,8 @@
} else if (match[3].charAt(0) === "[") { // #1195
var attrValue = match[6]
if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1")
cell.attrs[match[4]] = attrValue || true
if (match[4] === "class") classes.push(attrValue)
else cell.attrs[match[4]] = attrValue || true
}
}

2
mithril.min.js vendored

File diff suppressed because one or more lines are too long