Skip to content

Commit

Permalink
Enhancement: update generate_md_contents: 第一行必须是#开头才认为一级标题
Browse files Browse the repository at this point in the history
  • Loading branch information
superhj1987 committed Aug 20, 2018
1 parent 17f8ea6 commit 642dc56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/generate_md_contents
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():
with open(fname) as f:
lines = f.readlines()
for line in lines:
if i == 0 :
if i == 0 and line.startswith('#'):
contents.append(line) #添加一级title
contents += ['\n',contents_title,'\n'] #添加目录title
elif line.startswith(contents_title):
Expand Down

0 comments on commit 642dc56

Please sign in to comment.