🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: + notation
莘权 马b95a01079c4a
diff --git a/metagpt/roles/teacher.py b/metagpt/roles/teacher.pyindex acaa3860f..fede9f74a 100644--- a/metagpt/roles/teacher.py+++ b/metagpt/roles/teacher.py@@ -72,9 +72,9 @@ class Teacher(Role):@staticmethoddef new_file_name(lesson_title, ext=".md"):"""Create a related file name based on `lesson_title` and `ext`."""- # 定义需要替换的特殊字符+ # Define the special characters that need to be replaced.illegal_chars = r'[#@$%!*&\\/:*?"<>|\n\t \']'- # 将特殊字符替换为下划线+ # Replace the special characters with underscores.filename = re.sub(illegal_chars, '_', lesson_title) + extreturn re.sub(r'_+', '_', filename)