Remove requirement for titlebars matching length

This commit is contained in:
Otto Winter 2020-01-12 16:36:02 +01:00
parent 428d9e23a8
commit 4037e507d7
No known key found for this signature in database
GPG Key ID: 48ED2DDB96D7682C

View File

@ -45,19 +45,19 @@ for f in sorted(Path('.').glob('**/*.rst')):
lines = content.splitlines(keepends=False)
for i, line in enumerate(lines):
if i == 0:
continue
if not section_regex.match(line):
continue
line_above = lines[i - 1]
if len(line_above) != len(line):
errors.append("The title length must match the bar length below it. See {}:{}"
"".format(f, i+1))
if i + 1 < len(lines) and lines[i + 1]:
errors.append("Empty line after heading is missing. Please insert an "
"empty line. See {}:{}".format(f, i+1))
# for i, line in enumerate(lines):
# if i == 0:
# continue
#
# if not section_regex.match(line):
# continue
# line_above = lines[i - 1]
# if len(line_above) != len(line):
# errors.append("The title length must match the bar length below it. See {}:{}"
# "".format(f, i+1))
# if i + 1 < len(lines) and lines[i + 1]:
# errors.append("Empty line after heading is missing. Please insert an "
# "empty line. See {}:{}".format(f, i+1))
for i, line in enumerate(lines):
m = directive_regex.match(line)