"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "python/jsbeautifier/unpackers/packer.py" between
js-beautify-1.13.13.tar.gz and js-beautify-1.14.0.tar.gz

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

packer.py  (js-beautify-1.13.13):packer.py  (js-beautify-1.14.0)
skipping to change at line 38 skipping to change at line 38
"""Detects whether `source` is P.A.C.K.E.R. coded.""" """Detects whether `source` is P.A.C.K.E.R. coded."""
mystr = re.search( mystr = re.search(
"eval[ ]*\([ ]*function[ ]*\([ ]*p[ ]*,[ ]*a[ ]*,[ ]*c[" "eval[ ]*\([ ]*function[ ]*\([ ]*p[ ]*,[ ]*a[ ]*,[ ]*c["
" ]*,[ ]*k[ ]*,[ ]*e[ ]*,[ ]*", " ]*,[ ]*k[ ]*,[ ]*e[ ]*,[ ]*",
source, source,
) )
if mystr: if mystr:
begin_offset = mystr.start() begin_offset = mystr.start()
beginstr = source[:begin_offset] beginstr = source[:begin_offset]
if begin_offset != -1: if begin_offset != -1:
""" Find endstr""" """Find endstr"""
source_end = source[begin_offset:] source_end = source[begin_offset:]
if source_end.split("')))", 1)[0] == source_end: if source_end.split("')))", 1)[0] == source_end:
try: try:
endstr = source_end.split("}))", 1)[1] endstr = source_end.split("}))", 1)[1]
except IndexError: except IndexError:
endstr = "" endstr = ""
else: else:
endstr = source_end.split("')))", 1)[1] endstr = source_end.split("')))", 1)[1]
return mystr is not None return mystr is not None
 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)