cherry pick less fix from CodeMirror
Merge pull request #6189 from adobe/rlim/cherry-pick-less-fix

Cherry pick less fix from CodeMirror