Skip to content

Commit

Permalink
fix index out of range error
Browse files Browse the repository at this point in the history
  • Loading branch information
yikeke authored Sep 4, 2020
1 parent 0c3bf4e commit a433c88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/check-tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ def filter_frontmatter(content):
meta_pos = i.span()[1]
collect.append(meta_pos)

filter_point = collect[1]
content = content[filter_point:]
# if the number of "---" >= 2
if len(collect) >= 2:
filter_point = collect[1]
content = content[filter_point:]

return content

def filter_backticks(content, filename):
Expand Down

0 comments on commit a433c88

Please sign in to comment.