Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
printing with styled/non-unit-textwidth-character contents (#443)
Previously, BlockArrays with elements that used styling would throw off the printing, because the textwidth computation didn't account for the fact that some contents might have a different `length` relative to how much space they take up when printed. This fixes that by using the `ANSIIterator` from Base, ala JuliaLang/julia#47430. Unfortunately, `ANSIIterator` isn't exported at the moment - but the alternative is to depend on StringManipulations.jl or copy over the Base implementation. I added a test that shows the problem. Previously, it displayed as: ![image](https://github.com/user-attachments/assets/722037b0-aeb1-4aca-b8aa-2c603290cf02) With this, it displays as: ![image](https://github.com/user-attachments/assets/a0d5098d-8d5a-4019-a733-2a1acbcdaa4a)
- Loading branch information