Mago 0.19.4 🛠️
Bug Fixes & Improvements:
This patch release addresses several formatting bugs and improves the overall formatting logic.
- Statement Termination Logic: Corrected the logic for determining if a statement terminates scripting, particularly for
Declare
,For
,Foreach
,While
, and If statements with colon-delimited bodies. Also,HaltCompiler
is now correctly handled. - Assignment Formatting: Improved the logic for breaking after assignment operators, preventing unnecessary breaks in certain cases.
- Class-like Body Formatting: Refactored class-like body formatting to improve spacing and handle empty lines correctly between members.
- Terminator Formatting: Adjusted the formatting of
ClosingTag
terminators to add a space before the tag. - Statement Spacing: Enhanced the logic for adding spaces and newlines between statements, especially for
OpeningTag
statements. - Printer Logic: Corrected the handling of
LineSuffixBoundary
in the printer, ensuring correct spacing and line breaks. - HTML Template Formatting: Fixed an issue with comment placement in HTML templates, ensuring comments are correctly placed after PHP tags.
These changes address and close the following issues: #150, #138, #149, #151.