Skip to content

Conversation

anroots
Copy link

@anroots anroots commented Jan 21, 2015

There is a suspected bug where the output string does not have numeric array keys removed (when array.omit => true) if array.align is also set to true.

I added a test case to verify it's existence. As I understand from the README (option documentation), this is not the intended behavior. Could you verify and look into it?

There is a suspected bug where the output string
does not have numeric array keys removed (when
array.omit = true) if array.align is also set to true
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 2a90b11 on BIGBANK-AS:develop into db03190 on Riimu:master.

@Riimu
Copy link
Owner

Riimu commented Jan 21, 2015

This is actually intended behavior. I forgot to mention in the README that array.align overrides both array.omit and array.inline settings. However, there is actually no good reason for that to be the intended behavior. It is a bit silly, now that I think about it.

Note, however, that since it will not ignore array.inline (which defaults to '70'), the result of your test will actually be ['The Doctor', 'Martha Jones', 'Rose Tyler', 'Clara'] unless array.inline is set to false

@anroots
Copy link
Author

anroots commented Jan 21, 2015

Thank you for clarifying. I will close this and leave it up to you whether you want to enable using the three options at the same time. Although I find that I'd also like the arrays aligned AND without int keys. :)

@anroots anroots closed this Jan 21, 2015
@Riimu
Copy link
Owner

Riimu commented Jan 21, 2015

I've pushed a v2.0.2 release which implements the test you provided without failing it (after setting the array.inline to false).

In other words, the array.omit and array.inline settings are now respected even if array.align is set to true.

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

Successfully merging this pull request may close these issues.

3 participants