actarian / vscode-glsl-canvas

Live WebGL preview of GLSL shaders
MIT License
335 stars 25 forks source link

Formatter handles scientific notation incorrectly ( `1e-9` -> `1e - 9` ) #94

Open yoshi389111 opened 3 months ago

yoshi389111 commented 3 months ago

Thanks for the great extension!

I just noticed one issue and wanted to report it.

When formatting scientific notation with Use compact formatter disabled, spaces are added around the sign, which causes compilation errors.

before

const float EPSILON = 1e-9;
const float FOO = 1E+10F;

after

const float EPSILON = 1e - 9;
const float FOO = 1E + 10F;

environment