PR #4351 now in devel

7 views
Skip to first unread message

Edward K. Ream

unread,
May 8, 2025, 4:21:12 PM5/8/25
to leo-editor

PR #4351 has been merged into the "devel" and "6.84" branches. This PR automatically beautifies scripts when the setting @bool beautify-python-code-on-write is True. The PR also provides a beautify-tree command.


Previous similar projects failed because they could not handle section references properly. The stumbling block was devising "stand-in" code that would always satisfy Python's parser. But now Leo's beautifier only uses tokens, so the stand-in code must only satisfy Python's tokenizer, which is a much easier job.


This PR is (really!) likely to be the last for Leo 6.8.4. Please continue testing and report any problems. Thanks.


Edward

Reply all
Reply to author
Forward
0 new messages