Exponential number notation#36
Conversation
|
I just found a bug, so please don't merge just yet :) |
|
Bug fixed. Ready for review again. |
shellscape
left a comment
There was a problem hiding this comment.
looking good, and much appreciate the PR! my apologies for getting back to you on this so late. a few minor changes and I think we're good
|
|
||
| // Exponential number notation with minus or plus: 1e-10, 1e+10 | ||
| if (regex === wordEndNum || code === period) { | ||
| let code1 = css.charCodeAt(next), |
There was a problem hiding this comment.
let's get some better descriptors for variable names here. ncode ncode1 ncode2 would be a little better since it'd correspond with the values being pulled. we don't want to do nextCode, nextCodeNext, nextCodeNextnext or anything silly like that, but we can do better than code1-3.
| const tab = '\t'.charCodeAt(0); | ||
| const cr = '\r'.charCodeAt(0); | ||
| const at = '@'.charCodeAt(0); | ||
| const smallE = 'e'.charCodeAt(0); |
|
@shellscape Variables renamed. |
|
Thanks! Would you mind releasing this to npm? :) |
|
@shellscape Next time you get ten minutes over, would you mind releasing this to npm? :) |
|
done, thanks for the heads up |
Which issue # if any, does this resolve?
None; I didn't think of opening an issue first :)
Please check one:
CSS spec: https://www.w3.org/TR/css-syntax-3/#number-token-diagram
Support for exponential number notation is wanted in prettier/prettier#2627