marijnh/CodeMirror — pull request #783 by bfrohs (2012-09-03 02:59:36+00:00)
Title: Check if +/- is immediately followed by digit before marking as a leading sign (closes #782).

The current code makes the assumption that `+`/`-` is *always* a sign, but usually it is not (typically an operator). This does an additional check to make sure the next number is actually a digit, before eating it.

To test, the correct highlighting for the following code snippet should highlight the + as an operator, and each 2 as a number (taken from http://clojuredocs.org/clojure_core/1.2.0/clojure.test/deftest):

(is (= 4 (+ 2 2)))