odoo/documentation#17073

Created by Documentation, Niki Brown (nikbr)
Merged at 077cb5cc0214d6575ca79be8688c9a7a4d579b80

Statuses:

label
odoo-dev:17.0-make-review-toc-tree-update
head
2b533b20963c8d2ae36510d10f35cb8f8b7d5c83
merged
1 month ago by Sales, Antoine Vandevenne (anv)
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" />