dreamRs / prefixer

Prefix function with their namespace & other development tools
GNU General Public License v3.0
142 stars 5 forks source link

added additional carriage return #3

Closed wkdavis closed 4 years ago

wkdavis commented 4 years ago

I found that when warnings or messages are printed after the output of import_from() the messages are concatenated to the last importFrom line. For example,

> for(f in c(shinyWidgets::dropdownButton,shinyWidgets::prettySwitch)) {
+   import_from(f)
+ }
#' @importFrom htmltools validateCssUnit tags#' @importFrom htmltools validateCssUnit
#' @importFrom shiny restoreInput

> import_from2 <- function(f) {
+   import_from(f)
+   message("importFrom complete!")
+ }
> import_from2(shinyWidgets::dropdownButton)
#' @importFrom htmltools validateCssUnit tagsimportFrom complete!

Adding an additional carriage return forces subsequent output to the next line.

> for(f in c(shinyWidgets::dropdownButton,shinyWidgets::prettySwitch)) {
+   import_from(f)
+ }
#' @importFrom htmltools validateCssUnit tags
#' @importFrom htmltools validateCssUnit
#' @importFrom shiny restoreInput
> import_from2 <- function(f) {
+   import_from(f)
+   message("importFrom complete!")
+ }
> import_from2(shinyWidgets::dropdownButton)
#' @importFrom htmltools validateCssUnit tags
importFrom complete!
pvictor commented 4 years ago

Thanks for the fix ! 👍 Victor