| Package: regexplain | Package: regexplain | ||||
| Title: Rstudio addin to help you with your regexes (in progress) | Title: Rstudio addin to help you with your regexes (in progress) | ||||
| Version: 0.1.0 | |||||
| Version: 0.1.1 | |||||
| Date: 2018-03-07 | Date: 2018-03-07 | ||||
| Authors@R: c( | Authors@R: c( | ||||
| person("Garrick", "Aden-Buie", email = "g.adenbuie@gmail.com", role = c("aut", "cre")), | person("Garrick", "Aden-Buie", email = "g.adenbuie@gmail.com", role = c("aut", "cre")), |
| if (!render) return(res) | if (!render) return(res) | ||||
| head <- c( | head <- c( | ||||
| "---", "pagetitle: View Regex", "---", | "---", "pagetitle: View Regex", "---", | ||||
| "<h5>Regex</h5>", | |||||
| "<p><pre style = 'font-size: 1em;'>", wrap_regex(pattern, escape, exact), "</pre></p>", | |||||
| "<h5>Results</h5>" | |||||
| "<h5 style = 'font-size: 1.1em'>Regex</h5>", | |||||
| "<p><pre style = 'font-size: 1.25em;'>", wrap_regex(pattern, escape, exact), "</pre></p>", | |||||
| "<h5 style = 'font-size: 1.1em'>Results</h5>" | |||||
| ) | ) | ||||
| res <- c(head, res) | res <- c(head, res) | ||||
| tmp <- tempfile(fileext = ".Rmd") | tmp <- tempfile(fileext = ".Rmd") | ||||
| tmp_html <- suppressWarnings( | tmp_html <- suppressWarnings( | ||||
| rmarkdown::render( | rmarkdown::render( | ||||
| tmp, | tmp, | ||||
| output_format = rmarkdown::html_document(css = system.file('style.css', package='regexhelp')), | |||||
| output_format = rmarkdown::html_document(css = system.file('style.css', package='regexhelp'), theme = NULL), | |||||
| quiet = TRUE | quiet = TRUE | ||||
| )) | )) | ||||
| rstudioapi::viewer(tmp_html) | rstudioapi::viewer(tmp_html) |
| title: "regexplain" | title: "regexplain" | ||||
| output: github_document | output: github_document | ||||
| --- | --- | ||||
| [](commits/master) | |||||
| [](commits/master) | |||||
|  |  | ||||
| [](http://www.repostatus.org/#active) | [](http://www.repostatus.org/#active) | ||||
| [](https://cran.r-project.org/package=regexplain) | [](https://cran.r-project.org/package=regexplain) |
| regexplain | regexplain | ||||
| ================ | ================ | ||||
| [](commits/master) | |||||
| [](commits/master) | |||||
|  |  | ||||
| [![Project Status: Active – The project has reached a stable, usable | [![Project Status: Active – The project has reached a stable, usable | ||||
| state and is being actively | state and is being actively |