Browse Source

无JIRA任务 JS格式化导致死机

master
richie 6 years ago
parent
commit
8186642399
  1. 2
      designer-base/src/com/fr/design/javascript/beautify/JavaScriptFormatHelper.java
  2. 3537
      designer-base/src/com/fr/design/javascript/beautify/beautify.js

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

@ -40,7 +40,7 @@ public class JavaScriptFormatHelper {
Reader reader = new InputStreamReader(resourceAsStream);
scriptEngine.eval(reader);
Invocable invocable = (Invocable) scriptEngine;
result = (String) invocable.invokeFunction("js_beautify", jsCode, option.toFormatArgument());
result = (String) invocable.invokeFunction("js_beautify_global", jsCode, option.toFormatArgument());
} catch (ScriptException | NoSuchMethodException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

3537
designer-base/src/com/fr/design/javascript/beautify/beautify.js

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save