mago
mago copied to clipboard
Table Formatting Uses Print Width
🐞 Describe the Bug
When formatting array data in a tabular way, the formatter seems to respect the configured print-width limit which will result in tables formatting poorly when they exceed this.
🔄 Steps to Reproduce
- Configure a print-width for the project
- Create tabular array data which exceeds the print-width
- Run mago fmt
⚙️ Configuration (mago.toml)
[formatter]
print-width = 100
📜 Command Output
mago fmt
📂 PHP Code Sample (If Applicable)
<?php
$data = [
['Policy #', 'Insured', 'Insured Accounting Address', 'Producer', 'Line(s) of Business', 'Carrier', 'Retail Agency', 'Policy Term', ''],
[
'DEF456',
'Insured One DBA Some Other Business',
'Address One, Address Two, Address Three, City, California, 90210',
'User One',
'Commercial Property',
'Carrier One',
'Agency One',
'01/01/2012 - 07/02/2012',
'Some Actions',
],
[
'ABC123',
'Insured One DBA Some Other Business',
'Address One, Address Two, Address Three, City, California, 90210',
'User One',
'General Liability',
'Carrier One',
'Agency One',
'01/01/2012 - 07/02/2012',
'Some Actions',
],
];
🖥️ Operating System
macOS
📦 How did you install Mago?
Homebrew (brew install mago)
📝 Additional Context
It was suggested I raise this as a defect in #215.