Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

release/11.0
John.Ying 2 years ago
parent
commit
692b4302f8
  1. 16
      designer-base/src/main/java/com/fr/design/javascript/beautify/JavaScriptFormatHelper.java

16
designer-base/src/main/java/com/fr/design/javascript/beautify/JavaScriptFormatHelper.java

@ -1,16 +1,6 @@
package com.fr.design.javascript.beautify;
import com.eclipsesource.v8.V8;
import com.eclipsesource.v8.V8Array;
import com.eclipsesource.v8.V8Object;
import com.eclipsesource.v8.utils.V8ObjectUtils;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
public class JavaScriptFormatHelper {
@ -33,7 +23,7 @@ public class JavaScriptFormatHelper {
* @see <a href="https://github.com/beautify-web/js-beautify">JSBeautify<a/>
*/
public static String beautify(String jsCode, BeautifyOption option) {
InputStream resourceAsStream = IOUtils.readResource("com/fr/design/javascript/beautify/beautify.js");
/* InputStream resourceAsStream = IOUtils.readResource("com/fr/design/javascript/beautify/beautify.js");
String result = jsCode;
V8 v8 = V8.createV8Runtime();
try {
@ -49,8 +39,8 @@ public class JavaScriptFormatHelper {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} finally {
v8.release(true);
}
return result;
}*/
return jsCode;
}
public static void main(String[] args) {

Loading…
Cancel
Save