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

Indenting leading spaces is inconsistent? #779

Closed
jason5122 opened this issue Apr 18, 2021 · 3 comments
Closed

Indenting leading spaces is inconsistent? #779

jason5122 opened this issue Apr 18, 2021 · 3 comments

Comments

@jason5122
Copy link

Hi, I noticed that when there is a certain number of leading spaces, the line does not indent to the correct number. For example, with indent_by = 2 (though this issue appears for more than just 2 spaces),

4 leading spaces (for example):

function() {
     print("hi")
}

does not indent to 2 spaces. However,

17 leading spaces (for example):

function() {
                print("hi")
}

does indent to 2. Can anyone reproduce this, or does anyone know why this is?

System info

styler: 1.3.2
R: 4.0.4

@lorenzwalthert
Copy link
Collaborator

lorenzwalthert commented Apr 18, 2021

Thanks for reporting 👍. I can't reproduce this with the latest CRAN version (v1.4.0). I believe this is a cache invalidation issue, probably the one resolved in #647 and released in v1.4.0. Does the problem persist after installing the latest CRAN version?

@jason5122
Copy link
Author

I've updated to 1.4.1 and the problem no longer persists. Thanks so much for the quick response!

@lorenzwalthert
Copy link
Collaborator

Glad that solved the problem. 😊

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