mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-12 18:53:55 +01:00
fix beautify
This commit is contained in:
parent
79345a49b4
commit
e2d74f9432
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -189,11 +189,13 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function beautify(): void {
|
function beautify(): void {
|
||||||
setCode(code => beautifyCode(code, {
|
if (editorRef.current === null) return;
|
||||||
|
const pretty = beautifyCode(code, {
|
||||||
indent_with_tabs: !options.insertSpaces,
|
indent_with_tabs: !options.insertSpaces,
|
||||||
indent_size: 4,
|
indent_size: 4,
|
||||||
brace_style: "preserve-inline",
|
brace_style: "preserve-inline",
|
||||||
}));
|
});
|
||||||
|
editorRef.current.setValue(pretty);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFilenameChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
function onFilenameChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user