Commits

Tikitu de Jager committed da5b262

Protect against sequences of -/+ tokens, e.g. "a - -b" or "a + ++b". Solves issue #9.

  • Participants
  • Parent commits 1b657a2

Comments (0)

Files changed (1)

jsmin/__init__.py

                     or previous_non_space > '~') \
                     and (next2 in space_strings or next2 > '~'):
                     do_space = True
+                elif previous_non_space in '-+' and next2 == previous_non_space:
+                    # protect against + ++ or - -- sequences
+                    do_space = True
                 elif self.is_return and next2 == '/':
                     # returning a regex...
                     write(' ')