Skip to content
Snippets Groups Projects

Fixed bad capitalziation detection

Merged David Hrbáč requested to merge patch-1 into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -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)
Loading