update
Deploy / deploy (push) Canceled after 0s

This commit is contained in:
xuyue committed 2026-09-27 19:36:28 +08:00
1 parent 23844ae301
commit d25b5dbe6d
268 files changed
+3684 -8861

No files matched your search

+2 -8
View File
@@ -47,10 +47,7 @@ function formatSql(code: string) {
)
}
export async function formatCode(
code: string,
language: "python" | "c" | "cpp" | "sql",
) {
export async function formatCode(code: string, language: "python" | "c" | "cpp" | "sql") {
if (language === "sql") return formatSql(code)
if (language === "python") {
@@ -59,10 +56,7 @@ export async function formatCode(
code,
)
if (result.exitCode !== 0) {
throw new CodeFormatError(
result.stderr || "Invalid Python syntax",
"syntax",
)
throw new CodeFormatError(result.stderr || "Invalid Python syntax", "syntax")
}
return result.stdout
}