Просмотр исходного кода

Edit regex input placeholder and Regex -> RegEx

tags/v0.2.0
Garrick Aden-Buie 8 лет назад
Родитель
Сommit
398947a73c
3 измененных файлов: 11 добавлений и 11 удалений
  1. +1
    -1
      DESCRIPTION
  2. +8
    -8
      R/regex_gadget.R
  3. +2
    -2
      man/regex_gadget.Rd

+ 1
- 1
DESCRIPTION Просмотреть файл

@@ -1,6 +1,6 @@
Package: regexplain
Title: Rstudio Addin to Explain, Test and Build Regular Expressions
Version: 0.1.5
Version: 0.1.5.9000
Date: 2018-03-14
Authors@R: c(
person("Garrick", "Aden-Buie", email = "g.adenbuie@gmail.com", role = c("aut", "cre")),

+ 8
- 8
R/regex_gadget.R Просмотреть файл

@@ -3,11 +3,11 @@
#' @import miniUI
#' @import shiny
#' @param text Text to explore in gadget (editable using interface)
#' @param start_page Open gadget to this tab, one of `"Text"`, `"Regex"`,
#' @param start_page Open gadget to this tab, one of `"Text"`, `"RegEx"`,
#' `"Output"`, or `"Help"`
#' @export
regex_gadget <- function(text = NULL,
start_page = if (is.null(text)) "Text" else "Regex") {
start_page = if (is.null(text)) "Text" else "RegEx") {
stopifnot(requireNamespace("miniUI"), requireNamespace("shiny"))

update_available <- check_version()
@@ -18,10 +18,10 @@ regex_gadget <- function(text = NULL,
shiny::includeCSS(system.file("styles", "gadget.css", package = "regexplain")),
gadgetTitleBar(
"regexplain",
right = miniTitleBarButton("done", "Send Regex To Console", TRUE)
right = miniTitleBarButton("done", "Send RegEx To Console", TRUE)
),
miniTabstripPanel(
selected = match.arg(start_page, c("Text", "Regex", "Output", "Help")),
selected = match.arg(start_page, c("Text", "RegEx", "Output", "Help")),
# --- UI - Tab - Text ----
miniTabPanel(
"Text", icon = icon('file-text-o'),
@@ -39,14 +39,14 @@ regex_gadget <- function(text = NULL,
),
# ---- UI - Tab - Regex ----
miniTabPanel(
"Regex", icon = icon('terminal'),
"RegEx", icon = icon('terminal'),
miniContentPanel(
fillCol(
flex = c(1, 3),
fillCol(
flex = c(1, 1),
textInputCode('pattern', 'Regex', width = "100%",
placeholder = "Enter regex, single \\ okay"),
textInputCode('pattern', 'RegEx', width = "100%",
placeholder = "Standard RegEx, e.g. \\w+_\\d{2,4}\\s+"),
checkboxGroupInput(
'regex_options',
label = HTML(
@@ -95,7 +95,7 @@ regex_gadget <- function(text = NULL,
choices = regexFn_choices),
tags$span(class = "help-block",
style = "font-size:1.25rem; margin-top:-10px; margin-bottom:0px; margin-left:4px;",
"Adjust options in Regex tab")
"Adjust options in RegEx tab")
),
uiOutput("output_sub")
),

+ 2
- 2
man/regex_gadget.Rd Просмотреть файл

@@ -5,12 +5,12 @@
\title{regexplain gadget}
\usage{
regex_gadget(text = NULL, start_page = if (is.null(text)) "Text" else
"Regex")
"RegEx")
}
\arguments{
\item{text}{Text to explore in gadget (editable using interface)}

\item{start_page}{Open gadget to this tab, one of \code{"Text"}, \code{"Regex"},
\item{start_page}{Open gadget to this tab, one of \code{"Text"}, \code{"RegEx"},
\code{"Output"}, or \code{"Help"}}
}
\description{

Загрузка…
Отмена
Сохранить