spences10 / VBA-IDE-Code-Export

Export & Import VBA code for use with Git (or any VCS)
MIT License
119 stars 34 forks source link

Code "formatter" to fix whitespace issues #53

Open mattpalermo opened 7 years ago

mattpalermo commented 7 years ago

There are a few different "whitespace errors" that are introduced to the VBA when the code is imported (and exported?). Issues #22 and #45 are two of these whitespace errors.

I have also recently experienced a whitespace error where a trailing space will be added to line 2 of a form module. This is the line that looks like this:

Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} MyFormName

To solve these problems, the code should be run through a "formatter" on import (and on export?). It is important that this formatter is non-destructive. I think it would be best to only do enough manipulation to fix the whitespace errors and not get carried away with an other formatting.