mirror of
https://github.com/odoo/documentation.git
synced 2026-01-02 09:49:17 +07:00
[ADD] tests: image compression and resource file name checkers
task-2801043
closes odoo/documentation#4870
closes odoo/documentation#5436
X-original-commit: fa90e27c4e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
committed by
Antoine Vandevenne (anv)
parent
744b1cdfd2
commit
b9c7cd2ee8
@@ -128,7 +128,7 @@ def check_early_line_breaks(file, lines, options=None):
|
||||
'#.': lambda x: x.split('#. ', 1)[0],
|
||||
'default': lambda x: x.split(' ', 1)[0]
|
||||
}
|
||||
return next_line_dict.get(next_line_.lstrip()[:2], next_line_dict["default"])(
|
||||
return next_line_dict.get(next_line_.lstrip()[:2], next_line_dict['default'])(
|
||||
next_line_.lstrip()
|
||||
)
|
||||
else:
|
||||
@@ -141,7 +141,7 @@ def check_early_line_breaks(file, lines, options=None):
|
||||
and is_valid_line(next_line, ('+', '|', '- ', '* ', '#. '))
|
||||
):
|
||||
current_line_remaining_space = options.max_line_length - len(line)
|
||||
next_line_first_word = get_next_line_first_word(next_line)
|
||||
next_line_first_word = get_next_line_first_word(next_line).rstrip()
|
||||
if current_line_remaining_space > len(next_line_first_word):
|
||||
yield lno + 1, f"consider moving \"{next_line_first_word}\" to line {lno + 1}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user