Commit ce617b8e authored by Lubomir Prda's avatar Lubomir Prda

Fixed bad capitalziation detection

parent 22217da4
......@@ -26,7 +26,7 @@ def main(location):
# Loop through the list of lines and titlecase
# any line beginning with '#'.
return_value = 0
prev_line = lines.pop(0)
prev_line = lines[0]
disabled = 0
echo_filename = False
if location.find("mkdocs.yml") != -1:
......@@ -37,7 +37,7 @@ def main(location):
else:
if (line.startswith("``") or prev_line.startswith("pages:")) and disabled == 1:
disabled = 0
if line.startswith('#') and disabled == 0 and (location.find("mkdocs.yml") == -1):
if line.startswith('#') and (disabled == 0) and (location.find("mkdocs.yml") == -1):
if line != titlecase(line[:(line.find("]"))], callback=abbreviations)+line[(line.find("]")):]:
if return_value == 0 and echo_filename == False:
print("%s" % location)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment