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 @@ -79,7 +79,9 @@ def get_paths(dirs: str, m: int):
79
79
for dir in dirs :
80
80
target_dir , m = dirs_mapping [dir ]
81
81
for p in sorted (get_paths (dir , m )):
82
- print (p )
82
+ # example:
83
+ # p = 'solution/0000-0099/0003.Longest Substring Without Repeating Characters/README.md'
84
+ edit_url = f'https://github.com/doocs/leetcode/edit/main/{ p } '
83
85
with open (p , "r" , encoding = "utf-8" ) as f :
84
86
content = f .read ()
85
87
@@ -162,7 +164,7 @@ def get_paths(dirs: str, m: int):
162
164
comments: true
163
165
---
164
166
"""
165
- content = f"---\n comments: true\n { tag_headers } ---\n \n " + content
167
+ content = f"---\n comments: true\n edit_url: { edit_url } \ n{ tag_headers } ---\n \n " + content
166
168
with open (new_path , "w" , encoding = "utf-8" ) as f :
167
169
f .write (content )
168
170
You can’t perform that action at this time.
0 commit comments