feat: SQL 提交前自动格式化
Some checks failed
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:
2026-07-03 10:05:39 -06:00
parent 1cac0d01f8
commit 10dcb29704

View File

@@ -106,9 +106,9 @@ async function submit() {
}
}
// 0.5 提交前自动格式化Python3 用 ruffC/C++ 用 clang-format
// 0.5 提交前自动格式化Python3 用 ruffC/C++ 用 clang-formatSQL 用 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({