Mago 1.0.0-beta.31
This is a hotfix release that addresses a critical panic in the mago ast
command, ensuring stability when processing files with multi-byte characters.
🐞 CLI Fix
A critical bug has been fixed that could cause the mago ast --tokens
command to panic and crash when processing files containing multi-byte UTF-8 characters (e.g., emojis or CJK characters).
The crash occurred because the table-formatting logic was incorrectly truncating token values by byte length, which is unsafe for UTF-8 strings and can lead to a panic if a slice ends in the middle of a character.
The logic has been rewritten to be fully UTF-8 aware. It now correctly measures the visual width of characters and truncates strings on proper character boundaries. This not only resolves the panic but also ensures the token table aligns correctly for all character sets.
Closed Issues
Full Changelog: 1.0.0-beta.30...1.0.0-beta.31