"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "python/jsbeautifier/javascript/beautifier.py" between
js-beautify-1.14.4.tar.gz and js-beautify-1.14.5.tar.gz

About: JS Beautifier is a JavaScript (and bookmarket) beautifier.

beautifier.py  (js-beautify-1.14.4):beautifier.py  (js-beautify-1.14.5)
skipping to change at line 1597 skipping to change at line 1597
self.print_newline(preserve_statement_flags=preserve_statement_flags) self.print_newline(preserve_statement_flags=preserve_statement_flags)
def handle_dot(self, current_token): def handle_dot(self, current_token):
if self.start_of_statement(current_token): if self.start_of_statement(current_token):
# The conditional starts the statement if appropriate. # The conditional starts the statement if appropriate.
pass pass
else: else:
self.handle_whitespace_and_comments(current_token, True) self.handle_whitespace_and_comments(current_token, True)
if re.search("^([0-9])+$", self._flags.last_token.text): 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): if reserved_array(self._flags.last_token, _special_word_set):
self._output.space_before_token = False self._output.space_before_token = False
else: else:
# allow preserved newlines before dots in general # allow preserved newlines before dots in general
# force newlines on dots after close paren when break_chained - for # force newlines on dots after close paren when break_chained - for
# bar().baz() # bar().baz()
self.allow_wrap_or_preserved_newline( self.allow_wrap_or_preserved_newline(
current_token, current_token,
self._flags.last_token.text == ")" self._flags.last_token.text == ")"
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)