Skip to content

Commit 10e5804

Browse files
committed
Merge branch 'xml-tag-clean' of https://github.com/Rolland-He/ai-autograding-feedback into xml-tag-clean
2 parents 7902ecb + 2f2a01c commit 10e5804

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ai_feedback/helpers/template_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,18 @@ def _format_file_with_xml_tag(file_path: Path, tag_name: str) -> str:
146146

147147
def _wrap_lines_with_xml(lines: List[str], tag_name: str, filename: str, is_pdf: bool = False) -> str:
148148
"""Wrap lines with XML tags and add line numbers.
149-
149+
150150
Args:
151151
lines (List[str]): List of lines to format
152152
tag_name (str): The XML tag name (submission, solution, test_output)
153153
filename (str): The filename to include in the XML tag
154154
is_pdf (bool): Whether this is PDF content (affects empty line handling)
155-
155+
156156
Returns:
157157
str: Formatted content with XML tags and line numbers
158158
"""
159159
content = f"<{tag_name} file=\"{filename}\">\n"
160-
160+
161161
for i, line in enumerate(lines, start=1):
162162
if is_pdf:
163163
stripped_line = line.rstrip()
@@ -171,7 +171,7 @@ def _wrap_lines_with_xml(lines: List[str], tag_name: str, filename: str, is_pdf:
171171
content += f"(Line {i}) {stripped_line}\n"
172172
else:
173173
content += f"(Line {i}) {line}"
174-
174+
175175
content += f"</{tag_name}>\n\n"
176176
return content
177177

0 commit comments

Comments
 (0)