Use dashes for classes instead of camelCase
wooorm opened this issue · 4 comments
wooorm commented
Subject of the feature
Classes in HTML/CSS are typically written as lowercase and with dashes: this-that
, not thisThat
.
Problem
This library uses camelcase.
Expected behaviour
- Block math:
<div class="math math-display>
- Inline math:
<span class="math math-inline>
(optionally withmath-display
class for$$
)
/cc @Rokt33r
wooorm commented
If this is approved, I’d also want to suggest to drop the tag name check:
remark-math/packages/rehype-katex/index.js
Lines 28 to 33 in fd26772
...And just check classes (that way HTML authors, so without remark-math
, can use other tag names)
Rokt33r commented
Both make sense to me. I guess this should be major changes! I'll try it in this week.
Rokt33r commented
Oh you're already working on it! I'll keep tracking the changes then.
wooorm commented
Perfect! I’d like to see if KaTeX will move to hast, and based on that cut a new major release!