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

Depth limit seems to be off by one #174

Closed
torkleyy opened this issue Jun 6, 2019 · 3 comments · Fixed by #225
Closed

Depth limit seems to be off by one #174

torkleyy opened this issue Jun 6, 2019 · 3 comments · Fixed by #225
Labels

Comments

@torkleyy
Copy link
Contributor

torkleyy commented Jun 6, 2019

Currently, a depth limit of 1 means that nothing gets indented (same for 0). That seems wrong, as the limit should be the (inclusive) maximum depth.

This can be fixed by changing the pretty.indent < config.ident to a <= check.

@kvark Do you agree this is a bug?

@kvark
Copy link
Collaborator

kvark commented Jun 6, 2019

yeah, let's fix this

@Boscop
Copy link

Boscop commented Feb 26, 2020

Bump :)

@kvark
Copy link
Collaborator

kvark commented Feb 27, 2020

PR's welcome!

CAD97 added a commit to CAD97/ron that referenced this issue May 2, 2020
@CAD97 CAD97 mentioned this issue May 2, 2020
bors bot added a commit that referenced this issue May 2, 2020
225: Fix #174 r=kvark a=CAD97

Disclaimer: untested; just applies the patch recommended by @torkleyy in #174.

Closes #174.

Co-authored-by: Christopher Durham <[email protected]>
@kvark kvark closed this as completed in #225 May 3, 2020
kvark pushed a commit that referenced this issue May 3, 2020
* Fix #174

* Fix depth limit test for off-by-one fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants