Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent without sorting of attributes #59

Open
Jones-S opened this issue Jun 25, 2014 · 10 comments
Open

Indent without sorting of attributes #59

Jones-S opened this issue Jun 25, 2014 · 10 comments

Comments

@Jones-S
Copy link

Jones-S commented Jun 25, 2014

Hey there
I'm not sure whether this is the right place to address this issue, but I did not find any comment function on github.
Thanks for this plugin first of all! Helps me a lot.
there is just one thing: I don't want the plugin to rearrange my attributes of my xml nodes.
Could you tell me where I can disable that feature?
Thx a lot

Jonas

@ctf0
Copy link

ctf0 commented Sep 10, 2014

+1 ,for json too ,it will even help if you add an option to how the re-arrange the attr/prop ,something like CssComb.

@iGemini
Copy link

iGemini commented May 14, 2015

I'd also greatly appreciate the ability to indent my XML without the attributes being re-arranged.

@igrigorov
Copy link

+1 - sorting the attributes adds a lot of difficulty when trying to diff the previous (unformatted) and the formatted version of an XML file.
However, I'm not very optimistic if this can be fixed, it may be inherent to minidom, which this plugin uses.

@raghu777
Copy link

+1 - Need this feature.

On Wed, Jun 24, 2015 at 7:27 PM, giovannibgr [email protected]
wrote:

+1 - sorting the attributes adds a lot of difficulty when trying to diff
the previous (unformatted) and the formatted version of an XML file.
However, I'm not very optimistic if this can be fixed, it may be inherent
to minidom, which this plugin uses.


Reply to this email directly or view it on GitHub
#59 (comment)
.

@vclayton
Copy link

For those looking to indent JSON without sorting, you can edit your local copy of the package. Change the last line from:
return json.dumps(parsed, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
to
return json.dumps(parsed, sort_keys=False, indent=4, separators=(',', ': '), ensure_ascii=False)

@orchetect
Copy link

+1

Also a config parameter for number of spaces for each indent would be nice.

@slishnevsky
Copy link

slishnevsky commented Aug 2, 2018

+100500, please don't change the order of attributes

@hualig
Copy link

hualig commented Jan 25, 2019

I am using on Mac, where can I find local copy of package? It seems package is unzipped and no way to open it.

@fsinisi90
Copy link

+1 - sorting the attributes adds a lot of difficulty when trying to diff the previous (unformatted) and the formatted version of an XML file.
However, I'm not very optimistic if this can be fixed, it may be inherent to minidom, which this plugin uses.

You're right, another tool should be used according to this stackoverflow answer.

@panda7789
Copy link

Or can you please at least write it to the readme file? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests