dominikh / filesize

filesize is a small ruby class for handling filesizes with both the SI and binary prefixes, allowing conversion from any size to any other size.
MIT License
81 stars 16 forks source link

Normal formatting #12

Closed ioquatix closed 8 years ago

ioquatix commented 8 years ago

I feel like there should not be a space between the number and the unit. For example, the output of du.

dominikh commented 8 years ago

We're following SI here, which dictates a (small) space. If a small space isn't available, the next best substitution is a full space.

There is a space between the numerical value and unit symbol, even when the value is used in an adjectival sense, except in the case of superscript units for plane angle.

If you disagree with SI/the defaults of this gem, there are various ways of removing the space/constructing desired output yourself. But the default behaviour will not be changed.

ioquatix commented 8 years ago

There is a unicode character for small space: U+2009 perhaps it looks better.

dominikh commented 8 years ago

That also falls into the category of "you'll have to do that yourself". We'll stick to plain ASCII by default.

ioquatix commented 8 years ago

Okay, that's fine, it's just a pity that this library isn't very flexible or easy to use and it hasn't even hit 1.0 yet. Thanks.