We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1586852 commit a361e42Copy full SHA for a361e42
1 file changed
packages/hydrojudge/src/utils.ts
@@ -27,11 +27,8 @@ export namespace Lock {
27
}
28
29
30
-export function compilerText(stdout: string, stderr: string) {
31
- const ret = [];
32
- if (!EMPTY_STR.test(stdout)) ret.push(stdout.substring(0, 1024 * 1024));
33
- if (!EMPTY_STR.test(stderr)) ret.push(stderr.substring(0, 1024 * 1024));
34
- return ret.join('\n');
+export function compilerText(...messages: string[]) {
+ return messages.filter((i) => !EMPTY_STR.test(i)).map((i) => i.substring(0, 1024 * 1024)).join('\n');
35
36
37
function restrictFile(p: string) {
0 commit comments