Leo's devel branch now contains a nifty new beautifier based on leoTokens.py. The new beautifier is three times faster than the old! The stats (to beautify the 51 files in Leo's core) are 1.7 sec vs 4.2 sec!
Issue #3744 describes the task. Five separate PRs contributed. PR #3757 contains the final result, including a spectacular collapse in code complexity. PR #3773 fully covers leoTokens.py with unit tests.
Summary
Please test devel and report any problems immediately. Except for release-related issues, devel is code-complete.
I'll describe PR #3757 soon in an Engineering Notebook post.
Edward