Skip to content

Styling of active file via Addin should ensure EOF line break. - #311

Merged
lorenzwalthert merged 1 commit into
r-lib:masterfrom
lorenzwalthert:EOF-line-break
Jan 2, 2018
Merged

lorenzwalthert merged 1 commit into
r-lib:masterfrom
lorenzwalthert:EOF-line-break

Conversation

@lorenzwalthert

@lorenzwalthert lorenzwalthert commented Jan 2, 2018 •

Copy link
Copy Markdown
Collaborator

Closes #310 . enc::write_lines_enc(text, ...) (which is used for style_file(), style_pkg() etc.) always adds an extra blank line at the end of text (no matter whether of not the last line is an empty line), while rstudioapi::modifyRange() (which is used for the two Addins of styling active file or style selection) does not. Hence, we need to add an extra blank line manually when rstudioapi::modifyRange() is used in the styling of the active file.

@lorenzwalthert lorenzwalthert changed the title styling of active file via Addin ensures EOF line-break. Styling of active file via Addin ensures EOF line-break. Jan 2, 2018
@codecov-io

codecov-io commented Jan 2, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #311 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #311   +/-   ##
=======================================
  Coverage   91.18%   91.18%           
=======================================
  Files          30       30           
  Lines        1373     1373           
=======================================
  Hits         1252     1252           
  Misses        121      121
Impacted Files Coverage Δ
R/addins.R 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f83f119...790c443. Read the comment docs.

@lorenzwalthert lorenzwalthert changed the title Styling of active file via Addin ensures EOF line-break. Styling of active file via Addin should ensure EOF line-break. Jan 2, 2018
@lorenzwalthert lorenzwalthert changed the title Styling of active file via Addin should ensure EOF line-break. Styling of active file via Addin should ensure EOF line break. Jan 2, 2018
@lorenzwalthert
lorenzwalthert merged commit a7fff7a into r-lib:master Jan 2, 2018
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Oct 23, 2018
@lorenzwalthert lorenzwalthert mentioned this pull request Oct 23, 2018
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Oct 26, 2018
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Jan 4, 2019
@lorenzwalthert
lorenzwalthert deleted the EOF-line-break branch June 20, 2019 21:04
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.

2 participants