Update ToPythonString.mjs

Update after check in pull request failed
This commit is contained in:
Samuele Facenda 2022-10-02 10:35:52 +02:00 committed by GitHub
parent 3b8997003c
commit 364427c3e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,6 @@
*/
import Operation from "../Operation.mjs";
import OperationError from "../errors/OperationError.mjs";
/**
* toPythonString operation
@ -35,9 +34,9 @@ class ToPythonString extends Operation {
toPyChar(value) {
// check if it's a standard ascii value and return the corresponding char or format it as a hex value with the \x prefix
if (32 <= value && value <= 126)
return String.fromCharCode(value)
return String.fromCharCode(value);
else
return "\\x" + value.toString(16).padStart(2, "0")
return "\\x" + value.toString(16).padStart(2, "0");
}
/**