Skip to content

Trailing commas break folding #91

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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