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

r.removeLeadingComments fails when two lines of preceding comments are interrupted by a blank line #1417

Open
jbullock35 opened this issue Sep 12, 2023 · 0 comments
Labels

Comments

@jbullock35
Copy link

Describe the bug
r.removeLeadingComments usually removes comments on preceding lines when those lines are submitted to the terminal. But if a line of R code is preceded by three lines that have a specific configuration—a comment, followed by a blank line, followed by another comment—the second comment will be submitted to the terminal even if r.removeLeadingComments is TRUE.

To Reproduce

  1. In settings, enable r.removeLeadingComments
  2. Send this code to the terminal:
# comment 1

# comment 2
print("When you submit this line to the terminal, the second comment will be submitted, too.")

You will see that "#comment 2" has been submitted to the terminal, even though it shouldn't be.

Can you fix this issue by yourself? (We appreciate the help)
No, I'm afraid not.

Expected behavior
In the example above, the print line should be submitted to the terminal, but no comment should be submitted.

Environment (please complete the following information):

  • OS: Windows 10
  • VSCode Version: 1.82.0
  • R Version: 4.3.1
  • vscode-R version: 2.8.1

Additional context
Related to #1244 and #1245.

@jbullock35 jbullock35 added the bug label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant