marijnh/CodeMirror — pull request #2152 by cben (2014-01-17 01:33:09+00:00)
Title: Don't generate class="cm-"

The first commit is a bug fix.

The second is a nice-to-have relaxation - it's a bit hard that modes that want to return several styles must special-case the first (or last) to construct "foo bar baz" without leading/trailing spaces; "foo bar baz " would be easier.
It also opens the door to returning "" instead of null. It could be nice if "" were the interface all along — one benefit is that when wrapping an inner mode the result from token() could be processed as a string without special-casing null — but we can't rewrite history. Given existing modes that return null and existing wrappers that expect null and not "", I'm not sure you'll want to document this relaxation...