Skip to content

Json5 sort, add support for comments #246

Description

@luca-trigili

Describe the bug
If i try to sort json5 with comments an error (see attached images) popup

To Reproduce
Steps to reproduce the behavior:

  1. try to sort this JSON5
    "anno": {
      // TODO: Bla Blah
      "default": "2100",
      "dtype": "date",
      "format_out": "%Y",
      "length": 4,
      "mandatory": true
    },

Expected behavior
Comment should be moved during sort whit the text they are "attached" to

Screenshots
image

Environment :
PyCharm 2024.3.1.1 (Professional Edition)
Build #PY-243.22562.220, built on December 18, 2024
Licensed to Luca TRIGILI
Subscription is active until March 15, 2025.
For educational use only.
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.9.3-76060903-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 4
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
String Manipulation (9.15.0)
Current Desktop: pop:GNOME

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