You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code actually looked like this after beautification:
Traceback (most recent call last):
File "/home/itori/prettifier/meow.py", line 7, in <module>
res = jsbeautifier.beautify(meow, opts)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/__init__.py", line 82, in beautify
return b.beautify(string, opts)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/javascript/beautifier.py", line 185, in beautify
source_text = self.unpack(source_text, self._options.eval_code)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/javascript/beautifier.py", line 274, in unpack
return unpackers.run(source, evalcode)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/unpackers/__init__.py", line 50, in run
source = unpacker.unpack(source)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/unpackers/packer.py", line 72, in unpack
source = re.sub(r"\b\w+\b", lookup, payload, flags=re.ASCII)
File "/usr/lib/python3.10/re.py", line 209, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/home/itori/.local/lib/python3.10/site-packages/jsbeautifier/unpackers/packer.py", line 66, in lookup
return symtab[unbase(word)] or word
IndexError: list index out of range
Steps to Reproduce
Simply use this code provided above and try to run it
Hay there, I am new to open source, can you please mentor me and assign me some new basic issue which I can solve and give back to this open source community.
Description
I have noticed with the jsbeautifier library for python, certain code does not unpack. An example of this is:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
Simply use this code provided above and try to run it
Environment
OS: EndeavourOS (Linux Distro)
The text was updated successfully, but these errors were encountered: