Simplify docs preprocessing (#30947)

Closes #ISSUE

This was done as part of experimental work towards better validation of
our docs. The validation ended up being not worth it, however, I believe
this refactoring is

Release Notes:

- N/A *or* Added/Fixed/Improved ...
b057b4697fBen Kunkle committed on 5/19/2025, 12:16:14 PM· committed by GitHubparent57424e4
7 files changedLine totals unavailable