Warning: Unknown DOM property class. Did you mean className?
Opened this issue · 0 comments
It looks like version 1.2.2 has an error where it does todo.push([ 'class', m[1], { append: true } ])
where it should be todo.push([ 'className', m[1], { append: true } ])
- this means that you cannot add css classes to a markdown element. The error is at https://github.com/rstacruz/markdown-it-decorate/blob/master/index.js#L171
After looking at the code it seems there is a workaround by doing <!-- {className=foo} -->
rather than <!-- {.foo} -->
but this is obviously not ideal.
After a little extra investigation this seems to behave differently running a jest test than it does when running in Chrome after compiling from typescript to es5 - in jest the className functionality seems to do the wrong thing while in the real world it's the only way to get this to work...