Skip to content

Commit

Permalink
Fix test 'Do not remove whitespace after number'
Browse files Browse the repository at this point in the history
The Python version changed the wrong variable, which means that the
test fails.

This patch changes the variable from '_flags.whitespace_before' to
'_output.space_before_token'.
  • Loading branch information
havardAasen committed Aug 4, 2022
1 parent a5485f7 commit 457c571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/jsbeautifier/javascript/beautifier.py
Expand Up @@ -1603,7 +1603,7 @@ def handle_dot(self, current_token):
self.handle_whitespace_and_comments(current_token, True)

if re.search("^([0-9])+$", self._flags.last_token.text):
self._flags.whitespace_before = True
self._output.space_before_token = True

if reserved_array(self._flags.last_token, _special_word_set):
self._output.space_before_token = False
Expand Down

0 comments on commit 457c571

Please sign in to comment.