Fix - final rule was excluded incorrectly

This commit is contained in:
Wanderrful 2020-09-19 13:27:10 -05:00
parent abf8278aba
commit ec448b284d
1 changed files with 5 additions and 2 deletions
docs/rules/periphery

View File

@ -75,7 +75,7 @@ class RuleTable:
data = [[]] data = [[]]
for l in open('periphery.csv'): for l in open('periphery.csv', encoding='utf8'):
if '.-)' in l: if '.-)' in l:
data.append([]) data.append([])
@ -159,10 +159,13 @@ for d in data[1:]:
rows = rows[i:] rows = rows[i:]
# Strip off the flags table # Strip off the flags table
should_strip_flags = False
for i, r in enumerate(rows): for i, r in enumerate(rows):
if r[0] == 'Use' and r[1] == 'Explanation': if r[0] == 'Use' and r[1] == 'Explanation':
should_strip_flags = True
break break
rows = rows[:i] if should_strip_flags:
rows = rows[:i]
# Join together description which span multiple rows. # Join together description which span multiple rows.
continued_index = [] continued_index = []