Skip to content

Commit 85a469b

Browse files
committed
fix: update question num
1 parent d07a386 commit 85a469b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def format_contest_md(content: str) -> str:
99
res = re.findall(r"\[(.*?)\]\((.*?)\)", content)
1010
for _, link in res:
1111
num = link.split("/")[-2].split(".")[0]
12+
num = int(num)
1213
content = content.replace(link, f"./lc/{num}.md")
1314
content = f"---\ncomments: true\n---\n\n" + content
1415
return content
@@ -20,6 +21,7 @@ def format_contest_md_en(content: str) -> str:
2021
res = re.findall(r"\[(.*?)\]\((.*?)\)", content)
2122
for _, link in res:
2223
num = link.split("/")[-2].split(".")[0]
24+
num = int(num)
2325
content = content.replace(link, f"./lc/{num}.md")
2426
content = f"---\ncomments: true\n---\n\n" + content
2527
return content

0 commit comments

Comments
 (0)