Skip to content

Indexed arrays are broken after formatting #87

Description

@nx-danielalfes

Description
The brackets and the included digit of indexed arrays are replaced by a dot after formatting.
When using nested arrays it ends up with multiple dots.
I use version 0.2.5 in combination with prettier 2.8.8.

Expected behavior
Code will not be replaced!

To Reproduce

Original Source Code:

{% set slug = row.values[6] %}
{% set title = main_post[0][5] %} 

Formatted Source Code:

{% set slug = row.values. %}
{% set title = main_post.. %}

Checklist

  • I have checked the known issues to make sure this isn’t already a known issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions