vscode-antlers-language-server icon indicating copy to clipboard operation
vscode-antlers-language-server copied to clipboard

Nested Arrays are not formatted as expected

Open o1y opened this issue 1 year ago • 1 comments

Describe the bug Nested arrays are reduced to a single line.

Impacted Products Which Antlers Toolbox products does this bug apply to?

  • [x] Antlers Toolbox for VS Code
  • [x] Formatter CLI
  • [x] Antlers Prettier Plugin
  • [ ] Antlers Syntax Highlighting (external systems - not VS Code)

Versions and Other Plugins/Extensions Please include the product version you are reporting a bug for. If you are reporting a bug for products such as Antlers Toolbox for VS Code or the Antlers Prettier Plugin, please include a list of other configured extensions or plugins if you believe they are contributing to the problematic behavior.

To Reproduce Before

{{
    _array = [
        'one' => 1,
        'two' => 2,
        'three' => [
            'four' => 4,
            'five' => 5
        ]
    ]

    _value = _array['three']['five']
}}

After

{{ _array = ['one' => 1, 'two' => 2, 'three' => ['four' => 4, 'five' => 5]]_value = _array['three']['five'] }}

Expected behavior Either the nested array is formatted like the input, or at least there should be a space between the two variables if formatting nested arrays is not supported yet.

o1y avatar Feb 01 '24 13:02 o1y