File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ def format_contest_md(content: str) -> str:
11
11
res = re .findall (r"\[(.*?)\]\((.*?)\)" , content )
12
12
for title , link in res :
13
13
num = link .split ("/" )[- 2 ].split ('.' )[0 ]
14
- content = content .replace (link , f"/leetcode/lc/{ num } .md" )
14
+ content = content .replace (link , f"/leetcode/lc/{ num } .html" )
15
+ content = f"---\n comments: true\n ---\n \n " + content
15
16
return content
16
17
17
18
def format_contest_md_en (content : str ) -> str :
@@ -22,7 +23,8 @@ def format_contest_md_en(content: str) -> str:
22
23
res = re .findall (r"\[(.*?)\]\((.*?)\)" , content )
23
24
for title , link in res :
24
25
num = link .split ("/" )[- 2 ].split ('.' )[0 ]
25
- content = content .replace (link , f"/leetcode/en/lc/{ num } .md" )
26
+ content = content .replace (link , f"/leetcode/en/lc/{ num } .html" )
27
+ content = f"---\n comments: true\n ---\n \n " + content
26
28
return content
27
29
28
30
with open ("docs/contest.md" , "r" , encoding = "utf-8" ) as f :
You can’t perform that action at this time.
0 commit comments