atom/language-less — pull request #6 by izuzak (2014-06-27 20:32:45+00:00)
Title: Match numeric constant regex to LESS compiler

Fixes https://github.com/atom/language-less/issues/5

This matches the regex used to detect numeric constants to [the one used in the LESS compiler](https://github.com/less/less.js/blob/546bedd3440ff7e626f629bef40c6cc54e658d7e/lib/less/parser.js#L984). Also, this is the same expression defined in [the CSS3 spec](http://www.w3.org/TR/css3-syntax/#number-token-diagram):

![screen shot 2014-06-27 at 9 41 41 pm](https://cloud.githubusercontent.com/assets/38924/3417114/bdd67b6e-fe34-11e3-82c8-2cd419b5aafd.png)

The first part of that railroad diagram is `[+-]?\\d*\\.?\\d+`. For some reason, the less compiler doesn't seem to consider the exponent part. I'm happy to add that to the regex as well, if someone thinks we should? (it would be `([eE][+-]?\\d+)?`)

cc @kevinsawicki @tombell