feat: SQL 提交前自动格式化
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

格式化白名单加入 sql,后端用 sqlparse 处理

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Fable 5 committed 2026-07-03 10:05:39 -06:00
1 parent 1cac0d01f8
commit 10dcb29704
1 file changed
+2 -2
+2 -2
View File
@@ -106,9 +106,9 @@ async function submit() {
}
}
// 0.5 提交前自动格式化(Python3 用 ruff,C/C++ 用 clang-format)
// 0.5 提交前自动格式化(Python3 用 ruff,C/C++ 用 clang-format,SQL 用 sqlparse)
const formatLang = LANGUAGE_FORMAT_VALUE[codeStore.code.language]
if (["python", "c", "cpp"].includes(formatLang)) {
if (["python", "c", "cpp", "sql"].includes(formatLang)) {
isFormatting.value = true
try {
const res = await formatCode({