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

Wrong indention level of EQ_SUB token #352

Closed
lorenzwalthert opened this issue Feb 20, 2018 · 3 comments
Closed

Wrong indention level of EQ_SUB token #352

lorenzwalthert opened this issue Feb 20, 2018 · 3 comments

Comments

@lorenzwalthert
Copy link
Collaborator

lorenzwalthert commented Feb 20, 2018

5 and b should be indented 2 spaces.

styler::style_text("call(a = \n 5, \nb)", scope = "indention")
#> call(a =
#>     5,
#>   b)

Created on 2018-02-21 by the reprex package (v0.2.0).

@lorenzwalthert lorenzwalthert changed the title wrong indention level of EQ_SUB token Wrong indention level of EQ_SUB token Feb 20, 2018
@lorenzwalthert
Copy link
Collaborator Author

Blocks #351

@lorenzwalthert lorenzwalthert added this to the CRAN (styler 1.0.1) milestone Feb 20, 2018
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this issue Feb 22, 2018
needs_indention.*() takes an additional argument other_trigger_tokens which is used to determine whether a trigger causes indention. The new criteria is that (1) there is no multi-line token between the trigger and the first line break and (2) there is no other token between the potential trigger and the first line break that is going to cause indention. Aims to solve r-lib#352 and r-lib#351.
@lorenzwalthert
Copy link
Collaborator Author

lorenzwalthert commented Feb 28, 2018

Solved in #353, but #353 is supposed to solve #351 also (which is blocked by #357).

@lorenzwalthert
Copy link
Collaborator Author

Closed with #353.

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

1 participant