odoo/documentation#17089

Created by fw-bot
Merged at 8cc2d256bab79c176c52242bd9f6dbec635b6e68

Statuses:

label
odoo-dev:saas-19.1-17.0-make-review-toc-tree-update-511658-fw
head
7c835679f7afee8b3dda0b6db7b1440c83db11ca
merged
1 month ago by Documentation, Niki Brown (nikbr)
odoo/documentation
17.0 #17073
18.0 #17080
saas-18.2 #17081
saas-18.3 #17082
saas-18.4 #17087
19.0 #17088
saas-19.1 #17089
saas-19.2 #17090
saas-19.3
master #17091

[IMP] skip toctree in check_early_line_breaks

Task: https://www.odoo.com/odoo/project/3835/tasks/6065752

Issue:
Make review is showing early line break errors within toctrees:
<img width="875" height="754" alt="image" src="https://github.com/user-attachments/assets/a7e6de4f-19b4-4c18-97aa-b6f3d674538f" />

Solution:
Update check_early_line_breaks function to skip checking for early returns in a toctree.

Testing:
Run make review on a file that has a toctree at the bottom. For example: content/applications/marketing/events.rst

Expected output should be No problems found.

<img width="617" height="108" alt="image" src="https://github.com/user-attachments/assets/89077d78-90a8-4937-ba48-20170de35468" />

Forward-Port-Of: #17073