Browse Source

Tweak styles and headers in view_regex()

tags/v0.1.4
Garrick Aden-Buie 8 years ago
parent
commit
cf640fc45c
2 changed files with 18 additions and 4 deletions
  1. +4
    -4
      R/run_regex.R
  2. +14
    -0
      inst/styles/style.css

+ 4
- 4
R/run_regex.R View File

@@ -200,9 +200,9 @@ view_regex <- function(
if (!render) return(res)
head <- c(
"---", "pagetitle: View Regex", "---",
"<h5>Regex</h5>",
"<h5>Pattern</h5>",
"<p><pre>", wrap_regex(pattern, escape, exact), "</pre></p>",
"<h5>Results</h5>"
"<h5>Matches</h5>"
)
res <- c(head, res)
tmp <- tempfile(fileext = ".Rmd")
@@ -210,8 +210,8 @@ view_regex <- function(
tmp_html <- suppressWarnings(
rmarkdown::render(
tmp,
output_format = rmarkdown::html_document(css = c(system.file("styles", 'style.css', package='regexplain'),
system.file("styles", 'skeleton.css', package='regexplain')),
output_format = rmarkdown::html_document(css = c(system.file("styles", 'skeleton.css', package='regexplain'),
system.file("styles", 'style.css', package='regexplain')),
theme = NULL),
quiet = TRUE
))

+ 14
- 0
inst/styles/style.css View File

@@ -106,3 +106,17 @@
padding-bottom: 25px;
margin-bottom: 25px;
}

pre,
blockquote,
dl,
figure,
table,
p,
ul,
ol,
form {
margin-bottom: 1rem; }

body {
line-height: 18px;}

Loading…
Cancel
Save