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:
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/__init__.py", line 76, in beautify
return b.beautify(string, opts)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/javascript/beautifier.py", line 175, in beautify
source_text = self.unpack(source_text, self._options.eval_code)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/javascript/beautifier.py", line 257, in unpack
return unpackers.run(source, evalcode)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/unpackers/__init__.py", line 49, in run
source = unpacker.unpack(source)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/unpackers/packer.py", line 64, in unpack
source = re.sub(r'\b\w+\b', lookup, payload)
File "/opt/.pyenv/versions/3.8.3/lib/python3.8/re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/unpackers/packer.py", line 62, in lookup
return symtab[unbase(word)] or word
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/unpackers/packer.py", line 142, in __call__
return self.unbase(string)
File "/opt/.venv/lib/python3.8/site-packages/jsbeautifier/unpackers/packer.py", line 150, in _dictunbaser
ret += (self.base ** index) * self.dictionary[cipher]
KeyError: 'â'
Description
If the packed code contains special characters it results in an exception. The online beautifier works for the same.
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
Environment
OS:
Mac Catalina + Python 3.8.3
Settings
Example:
The text was updated successfully, but these errors were encountered: