Skip to content

Commit 76d1467

Browse files
author
charliesan
committed
Refactor code to handle different variations of file and project names
1 parent fe7883a commit 76d1467

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

runner/PMS.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ async def Write_code_Buffer(websocket, path):
9696
r"File_name :",
9797
r" File_name : ",
9898
r" File_name : ",
99+
100+
# file_nane cases
101+
r"File_nane: ",
102+
r"File_nane:",
103+
r" File_nane: ",
104+
r" File_nane :",
105+
106+
r"#File_name: ",
107+
r"#File_name:",
108+
r"# File_name: ",
99109
]
100110
Project_name_cases = [
101111
r"Project: ",
@@ -105,6 +115,9 @@ async def Write_code_Buffer(websocket, path):
105115
r"Project :",
106116
r" Project : ",
107117
r" Project : ",
118+
r"#Project: ",
119+
r"#Project:",
120+
r"# Project: ",
108121
]
109122
# check if the first line is a comment
110123
if any(re.match(pattern, first_line) for pattern in comment_patterns):

0 commit comments

Comments
 (0)