添加新的保留区域

This commit is contained in:
Robofish 2025-06-19 23:47:36 +08:00
parent c737ec79d4
commit ae6246474b
2 changed files with 1 additions and 1 deletions

View File

@ -1003,7 +1003,7 @@ class DataInterface(BaseInterface):
def repl(m): def repl(m):
return m.group(0).replace(m.group(1), old_content) return m.group(0).replace(m.group(1), old_content)
return pattern.sub(repl, new_code, count=1) return pattern.sub(repl, new_code, count=1)
for region in ["USER INCLUDE", "USER STRUCT", "USER CODE"]: for region in ["USER INCLUDE", "USER STRUCT", "USER CODE", "USER INIT CODE"]:
code = preserve_user_region(code, old_code, region) code = preserve_user_region(code, old_code, region)
with open(task_c_path, "w", encoding="utf-8") as f: with open(task_c_path, "w", encoding="utf-8") as f:
f.write(code) f.write(code)

BIN
User_code/.DS_Store vendored

Binary file not shown.