rokucommunity / brighterscript-formatter

A code formatter for BrighterScript (and BrightScript)
MIT License
15 stars 4 forks source link

Ensures that removeWhitespace function looks at all tokens to the right - Fixes #48 #49

Closed markwpearce closed 2 years ago

markwpearce commented 2 years ago

Quick fix to issue #48

There was a bug in the removeWhitespace() function that would only look at every other token. However, if the input was identifier,whitespace,identifier,whitespace, etc. it would only be looking at the whitespace tokens, and get rid of all of them. 😮

This fixes that issue so that the index of what token we're looking at does not increment when we remove a whitespace.