* source code
* @return The formatted source code
*/
public String format(String code, String encoding) {
try {
JSFormatter formatter = new JSFormatter();
formatter.setPreferredLineLength(PREFERRED_LINE_LENGTH);
formatter.setLineLengthDeviation(LINE_LENGTH_DEVIATION);
ByteArrayOutputStream out = new ByteArrayOutputStream(code.length());
formatter.format(
new BufferedReader(new StringReader(code)), new PrintWriter(out, true)
);
JSBeautifier beautifier = new JSBeautifier();