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

indentSpacer should be allowed to be 0 #96

Closed
ZevEisenberg opened this issue Nov 19, 2015 · 0 comments
Closed

indentSpacer should be allowed to be 0 #96

ZevEisenberg opened this issue Nov 19, 2015 · 0 comments

Comments

@ZevEisenberg
Copy link
Collaborator

The current code:

- (BONChainIndentSpacer)indentSpacer
{
    BONChainIndentSpacer indentSpacerBlock = ^(CGFloat indentSpacer) {
        NSAssert(indentSpacer > 0.0f, @"Indent spacer values must be greater than zero. Received %@", @(indentSpacer));
        __typeof(self) newChain = self.copyWithoutNextText;
        newChain.text.indentSpacer = indentSpacer;
        return newChain;
    };

    return [indentSpacerBlock copy];
}

However, there is no reason not to allow 0, because it will work, and it allows you to indent text that follows a space. Example use case:

example use case

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

1 participant