Skip to content

Commit

Permalink
feat: format pre & post script
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jul 15, 2022
1 parent e42ef23 commit cc9cadc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class EoEditorComponent implements AfterViewInit, OnInit, OnChanges {
this.aceRef.directiveRef.ace().renderer.updateFull(true);
}
formatCode(code, type) {
if (type === 'json') {
if (['json', 'javascript'].includes(type)) {
return beautifier.js(code, {
indent_size: 2,
space_in_empty_paren: true,
Expand Down

0 comments on commit cc9cadc

Please sign in to comment.