Skip to content

Commit b2b48a9

Browse files
committed
see changkun#5, fix *.md link error
1 parent 552cae9 commit b2b48a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

website/filter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# !/usr/bin/env python3
22
# author: changkun<hi@changkun.us>
33
import os
4+
import re
45

56
source_dir = [
67
'../book/zh-cn/'
@@ -26,4 +27,4 @@
2627
if any(keyword in line for keyword in ignores):
2728
continue
2829
else:
29-
output_file.write(line)
30+
output_file.write(re.sub(r'(./)(.*?)(.md)', r'../\2/index.html', line))

0 commit comments

Comments
 (0)