Token patch from https://github.com/marijnh/CodeMirror/commit/2c60a2831b21e40be0a42ad99925dec868996362