Skip to content

Trailing commas break folding #91

@guhetier

Description

@guhetier

When there is a trailing comma in a json object, foldings stop at the line with the trailing comma and restart at level one after it.

For instance,

{
  "baz": {
    "foo": "bar",
  }
}

give

+-- 3 lines: {-------------------
  }
}

instead of :

+-- 5 lines: {-------------------

Trailing commas are not valid in the JSON syntax but are accepted by several parser. They are therefore used in a lot of files where folding is currently broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions