for consistency with base and stringr argument names. Left "Send regex to console" button text same for consistency with tabs in gadget.tags/v0.1.3
| @@ -169,7 +169,7 @@ regex_gadget <- function(text = NULL, | |||
| observeEvent(input$done, { | |||
| # browser() | |||
| if (pattern() != "") { | |||
| pattern <- paste0('regex <- "', escape_backslash(pattern()), '"') | |||
| pattern <- paste0('pattern <- "', escape_backslash(pattern()), '"') | |||
| rstudioapi::sendToConsole(pattern, FALSE) | |||
| } | |||
| stopApp() | |||
| @@ -29,6 +29,8 @@ regexplain_cheatsheet <- function() { | |||
| runGadget(ui, server, viewer = viewer) | |||
| } | |||
| # ---- Help - Shiny Module ---- | |||
| help_ui <- function(id) { | |||
| ns <- NS(id) | |||
| @@ -55,7 +55,7 @@ The addin will open an interface with 4 panes where you can | |||
| When you're done, click on the **Send Regex to Console** to send your regex expression to... the console! | |||
| ```r | |||
| > regex <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)" | |||
| > pattern <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)" | |||
| ``` | |||
| ### Additional Addins | |||
| @@ -58,7 +58,7 @@ When you’re done, click on the **Send Regex to Console** to send your | |||
| regex expression to… the console\! | |||
| ``` r | |||
| > regex <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)" | |||
| > pattern <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)" | |||
| ``` | |||
| ### Additional Addins | |||