[FIX] tests: catch early line breaks in substitutions

closes odoo/documentation#15970

X-original-commit: 69082eb35d
Signed-off-by: Niki Brown (nikbr) <nikbr@odoo.com>
Signed-off-by: Zachary Straub (zst) <zst@odoo.com>
This commit is contained in:
Niki Brown
2026-01-05 22:04:27 +00:00
parent b30c6632d5
commit 19198ad6e8

View File

@@ -140,8 +140,8 @@ def check_early_line_breaks(file, lines, options=None):
if lno + 1 < len(lines):
next_line = lines[lno + 1]
if (
is_valid_line(line, ('+', '|'))
and is_valid_line(next_line, ('+', '|', '- ', '* ', '#. '))
is_valid_line(line, ('+', '| '))
and is_valid_line(next_line, ('+', '| ', '- ', '* ', '#. '))
):
current_line_remaining_space = options.max_line_length - len(line.rstrip())
next_line_first_word = get_next_line_first_word(next_line).rstrip()