INNER CODE UNIT · Python
normalized
undergroundwires/Azure-in-bullet-points · tools/markdownlint-fixer.py:32
normalized = math.ceil(total_white_spaces)
print(f'Bad total white spaces: {str(total_white_spaces)} normalized to {str(normalized)}. Line: "{line}"')
total_white_spaces = normalized
total_white_spaces = int(total_white_spaces)
for i in range(total_white_spaces):
line = ' ' + line
# Fix MD009 - No trailing whitespaces
text_part = line.split('\n')[0].rstrip(' ')
if line.endswith('\n'):
line = f'{text_part}\n'
else:
line = f'{text_part}'
# MD004 - Unordered list style
if line.lstrip().startswith('-'):
total_white_spaces = 0
while line.startswith(' '):
total_white_spaces += 1
line = line[1:len(line)]