Skip to content

Commit 606f6ab

Browse files
committed
Fix dappnode#68 Escape \n in Advanced mode output
1 parent 67dffba commit 606f6ab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

build/ui/src/components/Advanced/AdvancedTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
CircularProgress,
99
} from "@mui/material";
1010
import { AppService } from "../../services/AppService";
11+
import { escapeNewLine } from "../../utils/Utils";
1112

1213
interface AdvancedTabProps {}
1314

@@ -83,7 +84,7 @@ const AdvancedTab: React.FC<AdvancedTabProps> = (): JSX.Element => {
8384
wordBreak: "break-all",
8485
}}
8586
>
86-
{output}
87+
{escapeNewLine(output)}
8788
</pre>
8889
</Box>
8990
<form

build/ui/src/utils/Utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ export function enoughEthBalance(
3636
const is8EthPool = rplBalance >= minimumRpl8Eth;
3737
return is8EthPool ? ethBalance >= minimum8Eth : ethBalance >= minimum16Eth;
3838
}
39+
40+
export const escapeNewLine = (text: string) => text.replace(/(\\n)/g, "\n");

0 commit comments

Comments
 (0)