You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code > Reflow Comment (Ctrl/Cmd+Shift+/) does not work well with @examplesIf #14327
Still an issue! I really like the Reflow Comments feature as there are no other efficient way to wrap roxygen comments to 80 character. There are no good alternatives. (styler ignores them for example r-lib/styler#1147) but unfortunately, this bug makes it harder to use.
Maybe if @examplesIf were interpreted like @examples, it would work correctly?
I am not entirely sure what these lines do, but updating the regexp to allow two extra characters would possibly help?
Activity
ronblum commentedon Feb 27, 2024
@asadow Thank you for raising this!
Confirmed even going back to RStudio Desktop 2022.7.2.576 on MacOS 14.4.
While we're at it, here's what occurs with something plainer. For example,
becomes
This isn't just with roxygen comments, though. The behavior is the same with regular comments:
becomes
github-actions commentedon Aug 26, 2024
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
olivroy commentedon Aug 26, 2024
Still an issue! I really like the Reflow Comments feature as there are no other efficient way to wrap roxygen comments to 80 character. There are no good alternatives. (styler ignores them for example r-lib/styler#1147) but unfortunately, this bug makes it harder to use.
Maybe if
@examplesIfwere interpreted like@examples, it would work correctly?I am not entirely sure what these lines do, but updating the regexp to allow two extra characters would possibly help?
rstudio/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/EditingTargetCodeExecution.java
Line 465 in c33abd0
rstudio/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/EditingTargetCodeExecution.java
Line 499 in c33abd0
rstudio/src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/TextEditingTarget.java
Line 5402 in c33abd0
This regex appears correct
rstudio/src/gwt/src/org/rstudio/studio/client/common/filetypes/DocumentMode.java
Line 295 in c33abd0
This currently would match
#' @exampleand#' @examples, but not#' @examplesIf.