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

Wrap long lines #414

Merged
merged 1 commit into from
Apr 22, 2019
Merged

Wrap long lines #414

merged 1 commit into from
Apr 22, 2019

Conversation

lorenzwalthert
Copy link
Collaborator

@lorenzwalthert lorenzwalthert commented Aug 2, 2018

Reference: #390.

@lorenzwalthert
Copy link
Collaborator Author

lorenzwalthert commented Aug 12, 2018

  • rebasing on master and resolve merge conflicts.
  • apply styler to the PR.
  • replace base R calls to apply() and friends with purrr equivalents.
  • replace the repeat() and while() statements with recursions.
  • documenting with roxygen.
  • adding unit tests and thinking of exceptions.
  • some minor code refactoring (i.e. don't define functions within functions, function re-naming, exposing of the width argument).

@lorenzwalthert
Copy link
Collaborator Author

Potential problems with the current implementation are noted in
#247 (comment)

@krlmlr
Copy link
Member

krlmlr commented Sep 18, 2018

I'm seeing:

styler::style_text("1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1")
#> 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 +
#> 
#>   1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1
#>   + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1

Created on 2018-09-18 by the reprex package (v0.2.1)

All lines must end in a + .

@krlmlr
Copy link
Member

krlmlr commented Sep 18, 2018

Moreover, the following loops indefinitely:

styler::style_text('styler::style_text("1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1")')

lorenzwalthert added a commit that referenced this pull request Nov 18, 2018
@lorenzwalthert lorenzwalthert merged commit f498570 into r-lib:line-with Apr 22, 2019
@lorenzwalthert
Copy link
Collaborator Author

Ok, merging this now (not into master, just into the r-lib devel branch). Thanks @krivit.

@pat-s
Copy link
Contributor

pat-s commented Mar 20, 2020

Has the line-with branch ever been tried out in practice? I would be willing to though it would need a rebase with master - and I am afraid to run into merge conflicts :)

@lorenzwalthert
Copy link
Collaborator Author

Let's continue this discussion in #496.

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.

4 participants