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

Refactor stringify expression and rescue trailing comments; fixes #89, fixes #91 #114

Merged
merged 6 commits into from Sep 26, 2017

Conversation

Projects
None yet
2 participants
@jennybc
Member

jennybc commented Sep 26, 2017

This includes @jimhester's commit from #112.

It also rescues any trailing comment lines (#89).
It does NOT rescue comments trailing off the end of the last expression (#91).

Simplify stringify_expression()
This should now retain original formatting, so we should not need to
reformat with formatR / styler

@jennybc jennybc force-pushed the refactor-stringify-expression branch from 2f880ba to 3d295c6 Sep 26, 2017

}
trailing_comments <- function(.srcfile, n) {
raw_lines <- .srcfile[["lines"]]

This comment has been minimized.

@jimhester

jimhester Sep 26, 2017

Member

I am pretty sure you can use utils::getSrcLines(.srcfile, n, Inf) to retrieve the lines you are looking for.

This comment has been minimized.

@jennybc

jennybc Sep 26, 2017

Member

Indeed!

@jennybc jennybc changed the title from Refactor stringify expression to Refactor stringify expression and rescue trailing comments; fixes #89, fixes #91 Sep 26, 2017

@jennybc jennybc merged commit d455304 into master Sep 26, 2017

0 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@jennybc jennybc deleted the refactor-stringify-expression branch Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment