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

How to turn off leading zero on decimals? #543

Closed
abea opened this issue Sep 10, 2015 · 6 comments
Closed

How to turn off leading zero on decimals? #543

abea opened this issue Sep 10, 2015 · 6 comments

Comments

@abea
Copy link

abea commented Sep 10, 2015

I searched the options md file, but couldn't find this option. Is there a way to turn off the addition of a leading zero to decimal values in Sass (or altogether?). It conflicts with Sass linting.

E.g., leave margin: .5rem as-is instead of changing to margin: 0.5rem.

@Glavin001
Copy link
Owner

Please follow the contribution instructions at https://github.com/Glavin001/atom-beautify/blob/master/CONTRIBUTING.md#new-issues-bugs-questions-etc for creating a new issue. Specifically the parts about creating Gist with the results of command Atom Beautify: Help Debug Editor. This will provide us with additional information about your current setup, which beautifier is being used, an example file we can use for testing this feature later, and more. Thanks.

@abea
Copy link
Author

abea commented Sep 10, 2015

Thanks, Glavin. Here's my debug gist.

@Glavin001
Copy link
Owner

2015-09-10T17:36:03.050Z - verbose: [/Users/alex/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee] prettydiff inchar= , insize=2, objsort=false, preserve=none, cssinsertlines=false, comments=indent, force=false, quoteConvert=double, vertical=none, wrap=0, space=undefined, source=

Looks like Pretty Diff is being used. @prettydiff has created issue #524 to note which Pretty Diff options are still not supported by Atom Beautify. I see an option noleadzero: http://prettydiff.com/documentation.xhtml#noleadzero

If in CSS values leading 0s immediately preceeding a decimal should be removed or prevented.

This noleadzero sounds like the option you want.

This is good! It is pretty easy to add options to Atom Beautify languages and beautifiers. See #524 (comment) for some notes and links to applicable files, if you are interested in making a Pull Request.


Moved TODO list to #524 (comment)

@Glavin001 Glavin001 self-assigned this Sep 10, 2015
@Glavin001 Glavin001 added this to the v0.29.0 milestone Sep 10, 2015
@Glavin001
Copy link
Owner

I am going to mark this as a duplicate and migrate my comment over to #524.

@Glavin001
Copy link
Owner

Published to v0.28.12 as CSS option no_lead_zero

@abea
Copy link
Author

abea commented Sep 10, 2015

Excellent! Thank you, Glavin.

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

No branches or pull requests

2 participants