diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml
index 98822609..ad44d9b0 100644
--- a/.github/workflows/test-coverage.yaml
+++ b/.github/workflows/test-coverage.yaml
@@ -19,6 +19,8 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - uses: r-lib/actions/setup-pandoc@v2
+
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
diff --git a/R/reprex_render.R b/R/reprex_render.R
index b0e2145c..72e82c1c 100644
--- a/R/reprex_render.R
+++ b/R/reprex_render.R
@@ -182,26 +182,21 @@ reprex_render_impl <- function(input,
invisible(reprex_file)
}
-# heavily influenced by the post_processor() function of github_document()
+# influenced by the post_processor() function of github_document()
+# but with substantial reprex-specific updates in 2024-09
preview <- function(input) {
- css <- rmarkdown::pandoc_path_arg(
+ mode <- if (is_dark_mode()) "dark" else "light"
+ res_dir <- rmarkdown::pandoc_path_arg(
path_package(
- "rmarkdown",
- "rmarkdown/templates/github_document/resources/github.css"
- )
- )
- css <- glue("github-markdown-css:{css}")
- template <- rmarkdown::pandoc_path_arg(
- path_package(
- "rmarkdown",
- "rmarkdown/templates/github_document/resources/preview.html"
+ "reprex",
+ glue("rmarkdown/templates/reprex_document/resources")
)
)
args <- c(
- "--standalone", "--self-contained",
- "--highlight-style", "pygments",
- "--template", template,
- "--variable", css,
+ "--standalone", "--embed-resources",
+ "--highlight-style", path(res_dir, glue("starry-nights-{mode}.theme")),
+ "--css", path(res_dir, glue("github-{mode}.css")),
+ "--syntax-definition", path(res_dir, "r.xml"),
"--metadata", "pagetitle=PREVIEW",
"--quiet"
)
diff --git a/R/utils.R b/R/utils.R
index 5c022112..a3453d23 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -63,3 +63,12 @@ newline <- function(x) paste0(x, "\n")
is_testing <- function() {
identical(Sys.getenv("TESTTHAT"), "true")
}
+
+is_dark_mode <- function() {
+ if (rstudioapi::isAvailable() && rstudioapi::hasFun("getThemeInfo")) {
+ theme_info <- rstudioapi::getThemeInfo()
+ theme_info$dark
+ } else {
+ FALSE
+ }
+}
diff --git a/data-raw/github_css.R b/data-raw/github_css.R
new file mode 100644
index 00000000..2ac4d0a7
--- /dev/null
+++ b/data-raw/github_css.R
@@ -0,0 +1,20 @@
+# use the CSS found here:
+# https://github.com/sindresorhus/github-markdown-css
+# which aims to be:
+# "The minimal amount of CSS to replicate the GitHub Markdown style"
+
+library(usethis)
+
+use_directory("inst/rmarkdown/templates/reprex_document/resources")
+
+use_github_file(
+ repo_spec = "sindresorhus/github-markdown-css",
+ path = "github-markdown-dark.css",
+ save_as = "inst/rmarkdown/templates/reprex_document/resources/github-dark.css"
+)
+
+use_github_file(
+ repo_spec = "sindresorhus/github-markdown-css",
+ path = "github-markdown-light.css",
+ save_as = "inst/rmarkdown/templates/reprex_document/resources/github-light.css"
+)
diff --git a/data-raw/pandoc-syntax-highlighting.R b/data-raw/pandoc-syntax-highlighting.R
new file mode 100755
index 00000000..ee73a5ae
--- /dev/null
+++ b/data-raw/pandoc-syntax-highlighting.R
@@ -0,0 +1,195 @@
+# write Pandoc's default (pygments) highlight style to a JSON file
+# pandoc --print-highlight-style pygments > data-raw/pygments.theme
+# use this as a scaffold, but modify colors to match the Starry Night theme
+# that GitHub uses
+
+library(tidyverse)
+
+pyg <- jsonlite::fromJSON("data-raw/pygments.theme")
+pyg |> pluck("text-styles") |> names()
+
+# How does Pandoc do syntax highlighting?
+# https://pandoc.org/chunkedhtml-demo/13-syntax-highlighting.html
+# "The Haskell library skylighting is used for highlighting."
+
+# Pandoc/skylighting store themes using the
+# Syntax-Highlighting framework from KDE Frameworks
+
+# Learn the meaning of the styles (classes) supported by Pandoc here:
+# https://docs.kde.org/stable5/en/kate/katepart/highlight.html
+# see "Available Default Styles"
+# https://docs.kde.org/stable5/en/kate/katepart/color-themes.html
+# see "Default Text Styles"
+
+# this is me taking the styles Pandoc/skylighting expects,
+# noting what they are meant for conceptually,
+# and picking the starry-night color alias/variable that seems the best fit
+
+x <- str_glue('
+ Alert,"Text style for special words in comments, such as TODO, FIXME, XXXX and WARNING.",\\
+ comment,
+ Annotation,"Text style for annotations in comments or documentation commands, such as @param in Doxygen or JavaDoc.",\\
+ comment,
+ Attribute,"Text style for annotations or attributes of functions or objects, e.g. @override in Java, or __declspec(...) and __attribute__((...)) in C++.",\\
+ entity-tag,
+ BaseN,"(Base-N Integer): Text style for numbers with base other than 10.",\\
+ constant,
+ BuiltIn,"(Built-in): Text style for built-in language classes, functions and objects.",\\
+ entity,
+ Char,"(Character): Text style for single characters such as \'x\'.",\\
+ string,
+ Comment, "Text style for normal comments.",\\
+ comment,
+ CommentVar,"(Comment Variable): Text style that refers to variables names used in above commands in a comment, such as foobar in \'@param foobar\', in Doxygen or JavaDoc.",\\
+ comment,
+ Constant,"Text style for language constants and user defined constants, e.g. True, False, None in Python or nullptr in C/C++; or math constants like PI.",\\
+ constant,
+ ControlFlow,"(Control Flow): Text style for control flow keywords, such as if, then, else, return, switch, break, yield, continue, etc.",\\
+ keyword,
+ DataType,"(Data Type): Text style for built-in data types such as int, char, float, void, u64, etc.",\\
+ constant,
+ DecVal,"(Decimal/Value): Text style for decimal values.",\\
+ constant,
+ Documentation,"Text style for comments that reflect API documentation, such as /** doxygen comments */ or \"\"\"docstrings\"\"\".",\\
+ comment,
+ Error,"Text style indicating error highlighting and wrong syntax.",\\
+ invalid-illegal-text,invalid-illegal-bg
+ Extension,"Text style for well-known extensions, such as Qt™ classes, functions/macros in C++ and Python or boost.",\\
+ entity,
+ Float,"(Floating Point): Text style for floating point numbers.",\\
+ constant,
+ Function,"Text style for function definitions and function calls.",\\
+ entity,
+ Import,"(Imports, Modules, Includes): Text style for includes, imports, modules or LATEX packages.",\\
+ storage-modifier-import,
+ Information,"Text style for information, notes and tips, such as the keyword @note in Doxygen.",\\
+ comment,
+ Keyword,"Text style for built-in language keywords.",\\
+ keyword,
+ Operator,"Text style for operators, such as +, -, *, /, %, etc.",\\
+ keyword,
+ Others,"Text style for attributes that do not match any of the other default styles.",\\
+ ,
+ Preprocessor,"Text style for preprocessor statements or macro definitions.",\\
+ keyword,
+ SpecialChar,"(Special Character): Text style for escaped characters in strings, e.g. \"hello\\n\", and other characters with special meaning in strings, such as substitutions or regex operators.",\\
+ carriage-return-text,carriage-return-bg
+ SpecialString,"(Special String): Text style for special strings, such as regular expressions in ECMAScript, the LATEX math mode, SQL, etc.",\\
+ string-regexp,
+ String,"Text style for strings like \"hello world\".",\\
+ string,
+ Variable,"Text style for variables, if applicable. For instance, variables in PHP/Perl typically start with a $, so all identifiers following the pattern $foo are highlighted as variable.",\\
+ variable,
+ VerbatimString,"(Verbatim String): Text style for verbatim or raw strings like \'raw \backlash\' in Perl, CoffeeScript, and shells, as well as r\'\raw\' in Python, or such as HERE docs.",\\
+ string,
+ Warning,"Text style for warnings, such as the keyword @warning in Doxygen.",\\
+ comment,
+')
+
+dat <- read_csv(x, col_names = c("pyg_class", "pyg_note", "pl_text_style", "pl_background_style"))
+dat
+
+# get the starry-night css in order to excavate the colors
+use_github_file(
+ repo_spec = "wooorm/starry-night",
+ path = "style/dark.css",
+ save_as = "data-raw/starry-night-dark.css"
+)
+
+use_github_file(
+ repo_spec = "wooorm/starry-night",
+ path = "style/light.css",
+ save_as = "data-raw/starry-night-light.css"
+)
+
+raw_css_lines <- readLines("data-raw/starry-night-light.css")
+sn_light <- raw_css_lines |>
+ str_subset(" --color-prettylights-syntax-") |>
+ tibble() |>
+ set_names("raw") |>
+ mutate(comment = str_extract(raw, ".+:")) |>
+ mutate(color = str_extract(raw, "#[0-9a-fA-F]{6}")) |>
+ mutate(comment = str_remove(comment, " --color-prettylights-syntax-")) |>
+ mutate(comment = str_remove(comment, ":$")) |>
+ select(comment, color)
+
+raw_css_lines <- readLines("data-raw/starry-night-dark.css")
+sn_dark <- raw_css_lines |>
+ str_subset(" --color-prettylights-syntax-") |>
+ tibble() |>
+ set_names("raw") |>
+ mutate(comment = str_extract(raw, ".+:")) |>
+ mutate(color = str_extract(raw, "#[0-9a-fA-F]{6}")) |>
+ mutate(comment = str_remove(comment, " --color-prettylights-syntax-")) |>
+ mutate(comment = str_remove(comment, ":$")) |>
+ select(comment, color)
+
+dat
+sn_light
+sn_dark
+
+dat_light <- dat |>
+ rename(cls = pyg_class) |>
+ select(-pyg_note) |>
+ left_join(
+ sn_light,
+ by = join_by(pl_text_style == comment)
+ ) |>
+ rename(txt_col = color) |>
+ left_join(
+ sn_light,
+ by = join_by(pl_background_style == comment)
+ ) |>
+ rename(bg_col = color) |>
+ select(-starts_with("pl_"))
+dat_light
+
+dat_dark <- dat |>
+ rename(cls = pyg_class) |>
+ select(-pyg_note) |>
+ left_join(
+ sn_dark,
+ by = join_by(pl_text_style == comment)
+ ) |>
+ rename(txt_col = color) |>
+ left_join(
+ sn_dark,
+ by = join_by(pl_background_style == comment)
+ ) |>
+ rename(bg_col = color) |>
+ select(-starts_with("pl_"))
+dat_dark
+
+g <- function(cls, txt_col, bg_col) {
+ list(
+ `text-color` = txt_col,
+ `background-color` = bg_col,
+ bold = FALSE,
+ italic = FALSE,
+ underline = FALSE
+ )
+}
+
+theme_light <- theme_dark <- pyg
+theme_light[["text-styles"]] <- dat_light |>
+ pmap(g) |>
+ set_names(dat_light$cls)
+theme_dark[["text-styles"]] <- dat_dark |>
+ pmap(g) |>
+ set_names(dat_dark$cls)
+
+jsonlite::write_json(
+ theme_light,
+ "inst/rmarkdown/templates/reprex_document/resources/starry-nights-light.theme",
+ null = "null",
+ auto_unbox = TRUE,
+ pretty = TRUE
+)
+
+jsonlite::write_json(
+ theme_dark,
+ "inst/rmarkdown/templates/reprex_document/resources/starry-nights-dark.theme",
+ null = "null",
+ auto_unbox = TRUE,
+ pretty = TRUE
+)
diff --git a/data-raw/pygments.theme b/data-raw/pygments.theme
new file mode 100644
index 00000000..354a451e
--- /dev/null
+++ b/data-raw/pygments.theme
@@ -0,0 +1,211 @@
+{
+ "text-color": null,
+ "background-color": null,
+ "line-number-color": "#aaaaaa",
+ "line-number-background-color": null,
+ "text-styles": {
+ "Alert": {
+ "text-color": "#ff0000",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "Annotation": {
+ "text-color": "#60a0b0",
+ "background-color": null,
+ "bold": true,
+ "italic": true,
+ "underline": false
+ },
+ "Attribute": {
+ "text-color": "#7d9029",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BaseN": {
+ "text-color": "#40a070",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BuiltIn": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Char": {
+ "text-color": "#4070a0",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Comment": {
+ "text-color": "#60a0b0",
+ "background-color": null,
+ "bold": false,
+ "italic": true,
+ "underline": false
+ },
+ "CommentVar": {
+ "text-color": "#60a0b0",
+ "background-color": null,
+ "bold": true,
+ "italic": true,
+ "underline": false
+ },
+ "Constant": {
+ "text-color": "#880000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "ControlFlow": {
+ "text-color": "#007020",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "DataType": {
+ "text-color": "#902000",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DecVal": {
+ "text-color": "#40a070",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Documentation": {
+ "text-color": "#ba2121",
+ "background-color": null,
+ "bold": false,
+ "italic": true,
+ "underline": false
+ },
+ "Error": {
+ "text-color": "#ff0000",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "Extension": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Float": {
+ "text-color": "#40a070",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Function": {
+ "text-color": "#06287e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Import": {
+ "text-color": "#008000",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "Information": {
+ "text-color": "#60a0b0",
+ "background-color": null,
+ "bold": true,
+ "italic": true,
+ "underline": false
+ },
+ "Keyword": {
+ "text-color": "#007020",
+ "background-color": null,
+ "bold": true,
+ "italic": false,
+ "underline": false
+ },
+ "Operator": {
+ "text-color": "#666666",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Other": {
+ "text-color": "#007020",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Preprocessor": {
+ "text-color": "#bc7a00",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialChar": {
+ "text-color": "#4070a0",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialString": {
+ "text-color": "#bb6688",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "String": {
+ "text-color": "#4070a0",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Variable": {
+ "text-color": "#19177c",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "VerbatimString": {
+ "text-color": "#4070a0",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Warning": {
+ "text-color": "#60a0b0",
+ "background-color": null,
+ "bold": true,
+ "italic": true,
+ "underline": false
+ }
+ }
+}
diff --git a/data-raw/r-syntax-definition.R b/data-raw/r-syntax-definition.R
new file mode 100644
index 00000000..b7bafdf7
--- /dev/null
+++ b/data-raw/r-syntax-definition.R
@@ -0,0 +1,19 @@
+library(usethis)
+
+# the true source lives in KDE's GitLab instance, but I think this GitHub mirror
+# is good enough
+# https://invent.kde.org/frameworks/syntax-highlighting
+# https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/r.xml
+use_github_file(
+ repo_spec = "KDE/syntax-highlighting",
+ path = "data/syntax/r.xml",
+ save_as = "data-raw/r.xml"
+)
+
+fs::file_copy(
+ "data-raw/r.xml",
+ "inst/rmarkdown/templates/reprex_document/resources/r.xml"
+)
+
+# I then made some edits in the itemDatas section
+# I changed some of the default styles
diff --git a/data-raw/r.xml b/data-raw/r.xml
new file mode 100644
index 00000000..c6e0140e
--- /dev/null
+++ b/data-raw/r.xml
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+ - for
+ - in
+ - next
+ - break
+ - while
+ - repeat
+ - if
+ - else
+ - switch
+ - function
+
+
+ - TRUE
+ - FALSE
+ - NULL
+ - NA
+ - NA_integer_
+ - NA_real_
+ - NA_complex_
+ - NA_character_
+ - Inf
+ - NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data-raw/starry-night-dark.css b/data-raw/starry-night-dark.css
new file mode 100644
index 00000000..a7234898
--- /dev/null
+++ b/data-raw/starry-night-dark.css
@@ -0,0 +1,155 @@
+/* This is a theme distributed by `starry-night`.
+ * It’s based on what GitHub uses on their site.
+ * See for more info. */
+:root {
+ --color-prettylights-syntax-comment: #9198a1;
+ --color-prettylights-syntax-constant: #79c0ff;
+ --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
+ --color-prettylights-syntax-entity: #d2a8ff;
+ --color-prettylights-syntax-storage-modifier-import: #f0f6fc;
+ --color-prettylights-syntax-entity-tag: #7ee787;
+ --color-prettylights-syntax-keyword: #ff7b72;
+ --color-prettylights-syntax-string: #a5d6ff;
+ --color-prettylights-syntax-variable: #ffa657;
+ --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
+ --color-prettylights-syntax-brackethighlighter-angle: #9198a1;
+ --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
+ --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
+ --color-prettylights-syntax-carriage-return-text: #f0f6fc;
+ --color-prettylights-syntax-carriage-return-bg: #b62324;
+ --color-prettylights-syntax-string-regexp: #7ee787;
+ --color-prettylights-syntax-markup-list: #f2cc60;
+ --color-prettylights-syntax-markup-heading: #1f6feb;
+ --color-prettylights-syntax-markup-italic: #f0f6fc;
+ --color-prettylights-syntax-markup-bold: #f0f6fc;
+ --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
+ --color-prettylights-syntax-markup-deleted-bg: #67060c;
+ --color-prettylights-syntax-markup-inserted-text: #aff5b4;
+ --color-prettylights-syntax-markup-inserted-bg: #033a16;
+ --color-prettylights-syntax-markup-changed-text: #ffdfb6;
+ --color-prettylights-syntax-markup-changed-bg: #5a1e02;
+ --color-prettylights-syntax-markup-ignored-text: #f0f6fc;
+ --color-prettylights-syntax-markup-ignored-bg: #1158c7;
+ --color-prettylights-syntax-meta-diff-range: #d2a8ff;
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
+}
+
+.pl-c {
+ color: var(--color-prettylights-syntax-comment);
+}
+
+.pl-c1,
+.pl-s .pl-v {
+ color: var(--color-prettylights-syntax-constant);
+}
+
+.pl-e,
+.pl-en {
+ color: var(--color-prettylights-syntax-entity);
+}
+
+.pl-smi,
+.pl-s .pl-s1 {
+ color: var(--color-prettylights-syntax-storage-modifier-import);
+}
+
+.pl-ent {
+ color: var(--color-prettylights-syntax-entity-tag);
+}
+
+.pl-k {
+ color: var(--color-prettylights-syntax-keyword);
+}
+
+.pl-s,
+.pl-pds,
+.pl-s .pl-pse .pl-s1,
+.pl-sr,
+.pl-sr .pl-cce,
+.pl-sr .pl-sre,
+.pl-sr .pl-sra {
+ color: var(--color-prettylights-syntax-string);
+}
+
+.pl-v,
+.pl-smw {
+ color: var(--color-prettylights-syntax-variable);
+}
+
+.pl-bu {
+ color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
+}
+
+.pl-ii {
+ color: var(--color-prettylights-syntax-invalid-illegal-text);
+ background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
+}
+
+.pl-c2 {
+ color: var(--color-prettylights-syntax-carriage-return-text);
+ background-color: var(--color-prettylights-syntax-carriage-return-bg);
+}
+
+.pl-sr .pl-cce {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-string-regexp);
+}
+
+.pl-ml {
+ color: var(--color-prettylights-syntax-markup-list);
+}
+
+.pl-mh,
+.pl-mh .pl-en,
+.pl-ms {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-markup-heading);
+}
+
+.pl-mi {
+ font-style: italic;
+ color: var(--color-prettylights-syntax-markup-italic);
+}
+
+.pl-mb {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-markup-bold);
+}
+
+.pl-md {
+ color: var(--color-prettylights-syntax-markup-deleted-text);
+ background-color: var(--color-prettylights-syntax-markup-deleted-bg);
+}
+
+.pl-mi1 {
+ color: var(--color-prettylights-syntax-markup-inserted-text);
+ background-color: var(--color-prettylights-syntax-markup-inserted-bg);
+}
+
+.pl-mc {
+ color: var(--color-prettylights-syntax-markup-changed-text);
+ background-color: var(--color-prettylights-syntax-markup-changed-bg);
+}
+
+.pl-mi2 {
+ color: var(--color-prettylights-syntax-markup-ignored-text);
+ background-color: var(--color-prettylights-syntax-markup-ignored-bg);
+}
+
+.pl-mdr {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-meta-diff-range);
+}
+
+.pl-ba {
+ color: var(--color-prettylights-syntax-brackethighlighter-angle);
+}
+
+.pl-sg {
+ color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
+}
+
+.pl-corl {
+ text-decoration: underline;
+ color: var(--color-prettylights-syntax-constant-other-reference-link);
+}
diff --git a/data-raw/starry-night-light.css b/data-raw/starry-night-light.css
new file mode 100644
index 00000000..2995cf5c
--- /dev/null
+++ b/data-raw/starry-night-light.css
@@ -0,0 +1,155 @@
+/* This is a theme distributed by `starry-night`.
+ * It’s based on what GitHub uses on their site.
+ * See for more info. */
+:root {
+ --color-prettylights-syntax-comment: #59636e;
+ --color-prettylights-syntax-constant: #0550ae;
+ --color-prettylights-syntax-constant-other-reference-link: #0a3069;
+ --color-prettylights-syntax-entity: #6639ba;
+ --color-prettylights-syntax-storage-modifier-import: #1f2328;
+ --color-prettylights-syntax-entity-tag: #0550ae;
+ --color-prettylights-syntax-keyword: #cf222e;
+ --color-prettylights-syntax-string: #0a3069;
+ --color-prettylights-syntax-variable: #953800;
+ --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
+ --color-prettylights-syntax-brackethighlighter-angle: #59636e;
+ --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
+ --color-prettylights-syntax-invalid-illegal-bg: #82071e;
+ --color-prettylights-syntax-carriage-return-text: #f6f8fa;
+ --color-prettylights-syntax-carriage-return-bg: #cf222e;
+ --color-prettylights-syntax-string-regexp: #116329;
+ --color-prettylights-syntax-markup-list: #3b2300;
+ --color-prettylights-syntax-markup-heading: #0550ae;
+ --color-prettylights-syntax-markup-italic: #1f2328;
+ --color-prettylights-syntax-markup-bold: #1f2328;
+ --color-prettylights-syntax-markup-deleted-text: #82071e;
+ --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
+ --color-prettylights-syntax-markup-inserted-text: #116329;
+ --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
+ --color-prettylights-syntax-markup-changed-text: #953800;
+ --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
+ --color-prettylights-syntax-markup-ignored-text: #d1d9e0;
+ --color-prettylights-syntax-markup-ignored-bg: #0550ae;
+ --color-prettylights-syntax-meta-diff-range: #8250df;
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
+}
+
+.pl-c {
+ color: var(--color-prettylights-syntax-comment);
+}
+
+.pl-c1,
+.pl-s .pl-v {
+ color: var(--color-prettylights-syntax-constant);
+}
+
+.pl-e,
+.pl-en {
+ color: var(--color-prettylights-syntax-entity);
+}
+
+.pl-smi,
+.pl-s .pl-s1 {
+ color: var(--color-prettylights-syntax-storage-modifier-import);
+}
+
+.pl-ent {
+ color: var(--color-prettylights-syntax-entity-tag);
+}
+
+.pl-k {
+ color: var(--color-prettylights-syntax-keyword);
+}
+
+.pl-s,
+.pl-pds,
+.pl-s .pl-pse .pl-s1,
+.pl-sr,
+.pl-sr .pl-cce,
+.pl-sr .pl-sre,
+.pl-sr .pl-sra {
+ color: var(--color-prettylights-syntax-string);
+}
+
+.pl-v,
+.pl-smw {
+ color: var(--color-prettylights-syntax-variable);
+}
+
+.pl-bu {
+ color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
+}
+
+.pl-ii {
+ color: var(--color-prettylights-syntax-invalid-illegal-text);
+ background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
+}
+
+.pl-c2 {
+ color: var(--color-prettylights-syntax-carriage-return-text);
+ background-color: var(--color-prettylights-syntax-carriage-return-bg);
+}
+
+.pl-sr .pl-cce {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-string-regexp);
+}
+
+.pl-ml {
+ color: var(--color-prettylights-syntax-markup-list);
+}
+
+.pl-mh,
+.pl-mh .pl-en,
+.pl-ms {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-markup-heading);
+}
+
+.pl-mi {
+ font-style: italic;
+ color: var(--color-prettylights-syntax-markup-italic);
+}
+
+.pl-mb {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-markup-bold);
+}
+
+.pl-md {
+ color: var(--color-prettylights-syntax-markup-deleted-text);
+ background-color: var(--color-prettylights-syntax-markup-deleted-bg);
+}
+
+.pl-mi1 {
+ color: var(--color-prettylights-syntax-markup-inserted-text);
+ background-color: var(--color-prettylights-syntax-markup-inserted-bg);
+}
+
+.pl-mc {
+ color: var(--color-prettylights-syntax-markup-changed-text);
+ background-color: var(--color-prettylights-syntax-markup-changed-bg);
+}
+
+.pl-mi2 {
+ color: var(--color-prettylights-syntax-markup-ignored-text);
+ background-color: var(--color-prettylights-syntax-markup-ignored-bg);
+}
+
+.pl-mdr {
+ font-weight: bold;
+ color: var(--color-prettylights-syntax-meta-diff-range);
+}
+
+.pl-ba {
+ color: var(--color-prettylights-syntax-brackethighlighter-angle);
+}
+
+.pl-sg {
+ color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
+}
+
+.pl-corl {
+ text-decoration: underline;
+ color: var(--color-prettylights-syntax-constant-other-reference-link);
+}
diff --git a/inst/rmarkdown/templates/reprex_document/resources/github-dark.css b/inst/rmarkdown/templates/reprex_document/resources/github-dark.css
new file mode 100644
index 00000000..443e9681
--- /dev/null
+++ b/inst/rmarkdown/templates/reprex_document/resources/github-dark.css
@@ -0,0 +1,1113 @@
+/*dark*/
+
+body {
+ color-scheme: dark;
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+ margin: 0;
+ color: #e6edf3;
+ background-color: #0d1117;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
+ font-size: 16px;
+ line-height: 1.5;
+ word-wrap: break-word;
+ scroll-behavior: auto;
+}
+
+/* reprex tweaks */
+body {
+ box-sizing: border-box;
+ min-width: 200px;
+ max-width: 980px;
+ margin: 0 auto;
+ padding: 45px;
+ padding-top: 15px;
+}
+
+.octicon {
+ display: inline-block;
+ fill: currentColor;
+ vertical-align: text-bottom;
+}
+
+h1:hover .anchor .octicon-link:before,
+h2:hover .anchor .octicon-link:before,
+h3:hover .anchor .octicon-link:before,
+h4:hover .anchor .octicon-link:before,
+h5:hover .anchor .octicon-link:before,
+h6:hover .anchor .octicon-link:before {
+ width: 16px;
+ height: 16px;
+ content: ' ';
+ display: inline-block;
+ background-color: currentColor;
+ -webkit-mask-image: url("data:image/svg+xml,");
+ mask-image: url("data:image/svg+xml,");
+}
+
+details,
+figcaption,
+figure {
+ display: block;
+}
+
+summary {
+ display: list-item;
+}
+
+[hidden] {
+ display: none !important;
+}
+
+a {
+ background-color: transparent;
+ color: #4493f8;
+ text-decoration: none;
+}
+
+abbr[title] {
+ border-bottom: none;
+ -webkit-text-decoration: underline dotted;
+ text-decoration: underline dotted;
+}
+
+b,
+strong {
+ font-weight: 600;
+}
+
+dfn {
+ font-style: italic;
+}
+
+h1 {
+ margin: .67em 0;
+ font-weight: 600;
+ padding-bottom: .3em;
+ font-size: 2em;
+ border-bottom: 1px solid #30363db3;
+}
+
+mark {
+ background-color: #bb800926;
+ color: #e6edf3;
+}
+
+small {
+ font-size: 90%;
+}
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+img {
+ border-style: none;
+ max-width: 100%;
+ box-sizing: content-box;
+ background-color: #0d1117;
+}
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace;
+ font-size: 1em;
+}
+
+figure {
+ margin: 1em 40px;
+}
+
+hr {
+ box-sizing: content-box;
+ overflow: hidden;
+ background: transparent;
+ border-bottom: 1px solid #30363db3;
+ height: .25em;
+ padding: 0;
+ margin: 24px 0;
+ background-color: #30363d;
+ border: 0;
+}
+
+input {
+ font: inherit;
+ margin: 0;
+ overflow: visible;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+[type=button],
+[type=reset],
+[type=submit] {
+ -webkit-appearance: button;
+ appearance: button;
+}
+
+[type=checkbox],
+[type=radio] {
+ box-sizing: border-box;
+ padding: 0;
+}
+
+[type=number]::-webkit-inner-spin-button,
+[type=number]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+[type=search]::-webkit-search-cancel-button,
+[type=search]::-webkit-search-decoration {
+ -webkit-appearance: none;
+ appearance: none;
+}
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: .54;
+}
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ appearance: button;
+ font: inherit;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+::placeholder {
+ color: #8d96a0;
+ opacity: 1;
+}
+
+hr::before {
+ display: table;
+ content: "";
+}
+
+hr::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ display: block;
+ width: max-content;
+ max-width: 100%;
+ overflow: auto;
+}
+
+td,
+th {
+ padding: 0;
+}
+
+details summary {
+ cursor: pointer;
+}
+
+details:not([open])>*:not(summary) {
+ display: none;
+}
+
+a:focus,
+[role=button]:focus,
+input[type=radio]:focus,
+input[type=checkbox]:focus {
+ outline: 2px solid #1f6feb;
+ outline-offset: -2px;
+ box-shadow: none;
+}
+
+a:focus:not(:focus-visible),
+[role=button]:focus:not(:focus-visible),
+input[type=radio]:focus:not(:focus-visible),
+input[type=checkbox]:focus:not(:focus-visible) {
+ outline: solid 1px transparent;
+}
+
+a:focus-visible,
+[role=button]:focus-visible,
+input[type=radio]:focus-visible,
+input[type=checkbox]:focus-visible {
+ outline: 2px solid #1f6feb;
+ outline-offset: -2px;
+ box-shadow: none;
+}
+
+a:not([class]):focus,
+a:not([class]):focus-visible,
+input[type=radio]:focus,
+input[type=radio]:focus-visible,
+input[type=checkbox]:focus,
+input[type=checkbox]:focus-visible {
+ outline-offset: 0;
+}
+
+kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ line-height: 10px;
+ color: #e6edf3;
+ vertical-align: middle;
+ background-color: #161b22;
+ border: solid 1px #6e768166;
+ border-bottom-color: #6e768166;
+ border-radius: 6px;
+ box-shadow: inset 0 -1px 0 #6e768166;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin-top: 24px;
+ margin-bottom: 16px;
+ font-weight: 600;
+ line-height: 1.25;
+}
+
+h2 {
+ font-weight: 600;
+ padding-bottom: .3em;
+ font-size: 1.5em;
+ border-bottom: 1px solid #30363db3;
+}
+
+h3 {
+ font-weight: 600;
+ font-size: 1.25em;
+}
+
+h4 {
+ font-weight: 600;
+ font-size: 1em;
+}
+
+h5 {
+ font-weight: 600;
+ font-size: .875em;
+}
+
+h6 {
+ font-weight: 600;
+ font-size: .85em;
+ color: #8d96a0;
+}
+
+p {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+
+blockquote {
+ margin: 0;
+ padding: 0 1em;
+ color: #8d96a0;
+ border-left: .25em solid #30363d;
+}
+
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 2em;
+}
+
+ol ol,
+ul ol {
+ list-style-type: lower-roman;
+}
+
+ul ul ol,
+ul ol ol,
+ol ul ol,
+ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+dd {
+ margin-left: 0;
+}
+
+tt,
+code,
+samp {
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ font-size: 12px;
+}
+
+pre {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ font-size: 12px;
+ word-wrap: normal;
+}
+
+.octicon {
+ display: inline-block;
+ overflow: visible !important;
+ vertical-align: text-bottom;
+ fill: currentColor;
+}
+
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+ margin: 0;
+ -webkit-appearance: none;
+ appearance: none;
+}
+
+.mr-2 {
+ margin-right: 0.5rem !important;
+}
+
+.markdown-body::before {
+ display: table;
+ content: "";
+}
+
+.markdown-body::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+.markdown-body>*:first-child {
+ margin-top: 0 !important;
+}
+
+.markdown-body>*:last-child {
+ margin-bottom: 0 !important;
+}
+
+a:not([href]) {
+ color: inherit;
+ text-decoration: none;
+}
+
+.absent {
+ color: #f85149;
+}
+
+.anchor {
+ float: left;
+ padding-right: 4px;
+ margin-left: -20px;
+ line-height: 1;
+}
+
+.anchor:focus {
+ outline: none;
+}
+
+p,
+blockquote,
+ul,
+ol,
+dl,
+table,
+pre,
+details {
+ margin-top: 0;
+ margin-bottom: 16px;
+}
+
+blockquote>:first-child {
+ margin-top: 0;
+}
+
+blockquote>:last-child {
+ margin-bottom: 0;
+}
+
+h1 .octicon-link,
+h2 .octicon-link,
+h3 .octicon-link,
+h4 .octicon-link,
+h5 .octicon-link,
+h6 .octicon-link {
+ color: #e6edf3;
+ vertical-align: middle;
+ visibility: hidden;
+}
+
+h1:hover .anchor,
+h2:hover .anchor,
+h3:hover .anchor,
+h4:hover .anchor,
+h5:hover .anchor,
+h6:hover .anchor {
+ text-decoration: none;
+}
+
+h1:hover .anchor .octicon-link,
+h2:hover .anchor .octicon-link,
+h3:hover .anchor .octicon-link,
+h4:hover .anchor .octicon-link,
+h5:hover .anchor .octicon-link,
+h6:hover .anchor .octicon-link {
+ visibility: visible;
+}
+
+h1 tt,
+h1 code,
+h2 tt,
+h2 code,
+h3 tt,
+h3 code,
+h4 tt,
+h4 code,
+h5 tt,
+h5 code,
+h6 tt,
+h6 code {
+ padding: 0 .2em;
+ font-size: inherit;
+}
+
+summary h1,
+summary h2,
+summary h3,
+summary h4,
+summary h5,
+summary h6 {
+ display: inline-block;
+}
+
+summary h1 .anchor,
+summary h2 .anchor,
+summary h3 .anchor,
+summary h4 .anchor,
+summary h5 .anchor,
+summary h6 .anchor {
+ margin-left: -40px;
+}
+
+summary h1,
+summary h2 {
+ padding-bottom: 0;
+ border-bottom: 0;
+}
+
+ul.no-list,
+ol.no-list {
+ padding: 0;
+ list-style-type: none;
+}
+
+ol[type="a s"] {
+ list-style-type: lower-alpha;
+}
+
+ol[type="A s"] {
+ list-style-type: upper-alpha;
+}
+
+ol[type="i s"] {
+ list-style-type: lower-roman;
+}
+
+ol[type="I s"] {
+ list-style-type: upper-roman;
+}
+
+ol[type="1"] {
+ list-style-type: decimal;
+}
+
+div>ol:not([type]) {
+ list-style-type: decimal;
+}
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+li>p {
+ margin-top: 16px;
+}
+
+li+li {
+ margin-top: .25em;
+}
+
+dl {
+ padding: 0;
+}
+
+dl dt {
+ padding: 0;
+ margin-top: 16px;
+ font-size: 1em;
+ font-style: italic;
+ font-weight: 600;
+}
+
+dl dd {
+ padding: 0 16px;
+ margin-bottom: 16px;
+}
+
+table th {
+ font-weight: 600;
+}
+
+table th,
+table td {
+ padding: 6px 13px;
+ border: 1px solid #30363d;
+}
+
+table td>:last-child {
+ margin-bottom: 0;
+}
+
+table tr {
+ background-color: #0d1117;
+ border-top: 1px solid #30363db3;
+}
+
+table tr:nth-child(2n) {
+ background-color: #161b22;
+}
+
+table img {
+ background-color: transparent;
+}
+
+img[align=right] {
+ padding-left: 20px;
+}
+
+img[align=left] {
+ padding-right: 20px;
+}
+
+.emoji {
+ max-width: none;
+ vertical-align: text-top;
+ background-color: transparent;
+}
+
+span.frame {
+ display: block;
+ overflow: hidden;
+}
+
+span.frame>span {
+ display: block;
+ float: left;
+ width: auto;
+ padding: 7px;
+ margin: 13px 0 0;
+ overflow: hidden;
+ border: 1px solid #30363d;
+}
+
+span.frame span img {
+ display: block;
+ float: left;
+}
+
+span.frame span span {
+ display: block;
+ padding: 5px 0 0;
+ clear: both;
+ color: #e6edf3;
+}
+
+span.align-center {
+ display: block;
+ overflow: hidden;
+ clear: both;
+}
+
+span.align-center>span {
+ display: block;
+ margin: 13px auto 0;
+ overflow: hidden;
+ text-align: center;
+}
+
+span.align-center span img {
+ margin: 0 auto;
+ text-align: center;
+}
+
+span.align-right {
+ display: block;
+ overflow: hidden;
+ clear: both;
+}
+
+span.align-right>span {
+ display: block;
+ margin: 13px 0 0;
+ overflow: hidden;
+ text-align: right;
+}
+
+span.align-right span img {
+ margin: 0;
+ text-align: right;
+}
+
+span.float-left {
+ display: block;
+ float: left;
+ margin-right: 13px;
+ overflow: hidden;
+}
+
+span.float-left span {
+ margin: 13px 0 0;
+}
+
+span.float-right {
+ display: block;
+ float: right;
+ margin-left: 13px;
+ overflow: hidden;
+}
+
+span.float-right>span {
+ display: block;
+ margin: 13px auto 0;
+ overflow: hidden;
+ text-align: right;
+}
+
+code,
+tt {
+ padding: .2em .4em;
+ margin: 0;
+ font-size: 85%;
+ white-space: break-spaces;
+ background-color: #6e768166;
+ border-radius: 6px;
+}
+
+code br,
+tt br {
+ display: none;
+}
+
+del code {
+ text-decoration: inherit;
+}
+
+samp {
+ font-size: 85%;
+}
+
+pre code {
+ font-size: 100%;
+}
+
+pre>code {
+ padding: 0;
+ margin: 0;
+ word-break: normal;
+ white-space: pre;
+ background: transparent;
+ border: 0;
+}
+
+.highlight {
+ margin-bottom: 16px;
+}
+
+.highlight pre {
+ margin-bottom: 0;
+ word-break: normal;
+}
+
+.highlight pre,
+pre {
+ padding: 16px;
+ overflow: auto;
+ font-size: 85%;
+ line-height: 1.45;
+ color: #e6edf3;
+ background-color: #161b22;
+ border-radius: 6px;
+}
+
+pre code,
+pre tt {
+ display: inline;
+ max-width: auto;
+ padding: 0;
+ margin: 0;
+ overflow: visible;
+ line-height: inherit;
+ word-wrap: normal;
+ background-color: transparent;
+ border: 0;
+}
+
+.csv-data td,
+.csv-data th {
+ padding: 5px;
+ overflow: hidden;
+ font-size: 12px;
+ line-height: 1;
+ text-align: left;
+ white-space: nowrap;
+}
+
+.csv-data .blob-num {
+ padding: 10px 8px 9px;
+ text-align: right;
+ background: #0d1117;
+ border: 0;
+}
+
+.csv-data tr {
+ border-top: 0;
+}
+
+.csv-data th {
+ font-weight: 600;
+ background: #161b22;
+ border-top: 0;
+}
+
+[data-footnote-ref]::before {
+ content: "[";
+}
+
+[data-footnote-ref]::after {
+ content: "]";
+}
+
+.footnotes {
+ font-size: 12px;
+ color: #8d96a0;
+ border-top: 1px solid #30363d;
+}
+
+.footnotes ol {
+ padding-left: 16px;
+}
+
+.footnotes ol ul {
+ display: inline-block;
+ padding-left: 16px;
+ margin-top: 16px;
+}
+
+.footnotes li {
+ position: relative;
+}
+
+.footnotes li:target::before {
+ position: absolute;
+ top: -8px;
+ right: -8px;
+ bottom: -8px;
+ left: -24px;
+ pointer-events: none;
+ content: "";
+ border: 2px solid #1f6feb;
+ border-radius: 6px;
+}
+
+.footnotes li:target {
+ color: #e6edf3;
+}
+
+.footnotes .data-footnote-backref g-emoji {
+ font-family: monospace;
+}
+
+.pl-c {
+ color: #8b949e;
+}
+
+.pl-c1,
+.pl-s .pl-v {
+ color: #79c0ff;
+}
+
+.pl-e,
+.pl-en {
+ color: #d2a8ff;
+}
+
+.pl-smi,
+.pl-s .pl-s1 {
+ color: #c9d1d9;
+}
+
+.pl-ent {
+ color: #7ee787;
+}
+
+.pl-k {
+ color: #ff7b72;
+}
+
+.pl-s,
+.pl-pds,
+.pl-s .pl-pse .pl-s1,
+.pl-sr,
+.pl-sr .pl-cce,
+.pl-sr .pl-sre,
+.pl-sr .pl-sra {
+ color: #a5d6ff;
+}
+
+.pl-v,
+.pl-smw {
+ color: #ffa657;
+}
+
+.pl-bu {
+ color: #f85149;
+}
+
+.pl-ii {
+ color: #f0f6fc;
+ background-color: #8e1519;
+}
+
+.pl-c2 {
+ color: #f0f6fc;
+ background-color: #b62324;
+}
+
+.pl-sr .pl-cce {
+ font-weight: bold;
+ color: #7ee787;
+}
+
+.pl-ml {
+ color: #f2cc60;
+}
+
+.pl-mh,
+.pl-mh .pl-en,
+.pl-ms {
+ font-weight: bold;
+ color: #1f6feb;
+}
+
+.pl-mi {
+ font-style: italic;
+ color: #c9d1d9;
+}
+
+.pl-mb {
+ font-weight: bold;
+ color: #c9d1d9;
+}
+
+.pl-md {
+ color: #ffdcd7;
+ background-color: #67060c;
+}
+
+.pl-mi1 {
+ color: #aff5b4;
+ background-color: #033a16;
+}
+
+.pl-mc {
+ color: #ffdfb6;
+ background-color: #5a1e02;
+}
+
+.pl-mi2 {
+ color: #c9d1d9;
+ background-color: #1158c7;
+}
+
+.pl-mdr {
+ font-weight: bold;
+ color: #d2a8ff;
+}
+
+.pl-ba {
+ color: #8b949e;
+}
+
+.pl-sg {
+ color: #484f58;
+}
+
+.pl-corl {
+ text-decoration: underline;
+ color: #a5d6ff;
+}
+
+[role=button]:focus:not(:focus-visible),
+[role=tabpanel][tabindex="0"]:focus:not(:focus-visible),
+button:focus:not(:focus-visible),
+summary:focus:not(:focus-visible),
+a:focus:not(:focus-visible) {
+ outline: none;
+ box-shadow: none;
+}
+
+[tabindex="0"]:focus:not(:focus-visible),
+details-dialog:focus:not(:focus-visible) {
+ outline: none;
+}
+
+g-emoji {
+ display: inline-block;
+ min-width: 1ch;
+ font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
+ font-size: 1em;
+ font-style: normal !important;
+ font-weight: 400;
+ line-height: 1;
+ vertical-align: -0.075em;
+}
+
+g-emoji img {
+ width: 1em;
+ height: 1em;
+}
+
+.task-list-item {
+ list-style-type: none;
+}
+
+.task-list-item label {
+ font-weight: 400;
+}
+
+.task-list-item.enabled label {
+ cursor: pointer;
+}
+
+.task-list-item+.task-list-item {
+ margin-top: 0.25rem;
+}
+
+.task-list-item .handle {
+ display: none;
+}
+
+.task-list-item-checkbox {
+ margin: 0 .2em .25em -1.4em;
+ vertical-align: middle;
+}
+
+.contains-task-list:dir(rtl) .task-list-item-checkbox {
+ margin: 0 -1.6em .25em .2em;
+}
+
+.contains-task-list {
+ position: relative;
+}
+
+.contains-task-list:hover .task-list-item-convert-container,
+.contains-task-list:focus-within .task-list-item-convert-container {
+ display: block;
+ width: auto;
+ height: 24px;
+ overflow: visible;
+ clip: auto;
+}
+
+::-webkit-calendar-picker-indicator {
+ filter: invert(50%);
+}
+
+.markdown-alert {
+ padding: 0.5rem 1rem;
+ margin-bottom: 1rem;
+ color: inherit;
+ border-left: .25em solid #30363d;
+}
+
+.markdown-alert>:first-child {
+ margin-top: 0;
+}
+
+.markdown-alert>:last-child {
+ margin-bottom: 0;
+}
+
+.markdown-alert .markdown-alert-title {
+ display: flex;
+ font-weight: 500;
+ align-items: center;
+ line-height: 1;
+}
+
+.markdown-alert.markdown-alert-note {
+ border-left-color: #1f6feb;
+}
+
+.markdown-alert.markdown-alert-note .markdown-alert-title {
+ color: #4493f8;
+}
+
+.markdown-alert.markdown-alert-important {
+ border-left-color: #8957e5;
+}
+
+.markdown-alert.markdown-alert-important .markdown-alert-title {
+ color: #ab7df8;
+}
+
+.markdown-alert.markdown-alert-warning {
+ border-left-color: #9e6a03;
+}
+
+.markdown-alert.markdown-alert-warning .markdown-alert-title {
+ color: #d29922;
+}
+
+.markdown-alert.markdown-alert-tip {
+ border-left-color: #238636;
+}
+
+.markdown-alert.markdown-alert-tip .markdown-alert-title {
+ color: #3fb950;
+}
+
+.markdown-alert.markdown-alert-caution {
+ border-left-color: #da3633;
+}
+
+.markdown-alert.markdown-alert-caution .markdown-alert-title {
+ color: #f85149;
+}
+
+.markdown-body>*:first-child>.heading-element:first-child {
+ margin-top: 0 !important;
+}
diff --git a/inst/rmarkdown/templates/reprex_document/resources/github-light.css b/inst/rmarkdown/templates/reprex_document/resources/github-light.css
new file mode 100644
index 00000000..0868eba6
--- /dev/null
+++ b/inst/rmarkdown/templates/reprex_document/resources/github-light.css
@@ -0,0 +1,1112 @@
+/*light*/
+
+body {
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+ margin: 0;
+ color: #1f2328;
+ background-color: #ffffff;
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
+ font-size: 16px;
+ line-height: 1.5;
+ word-wrap: break-word;
+ scroll-behavior: auto;
+}
+
+/* reprex tweaks */
+body {
+ box-sizing: border-box;
+ min-width: 200px;
+ max-width: 980px;
+ margin: 0 auto;
+ padding: 45px;
+ padding-top: 15px;
+}
+
+.octicon {
+ display: inline-block;
+ fill: currentColor;
+ vertical-align: text-bottom;
+}
+
+h1:hover .anchor .octicon-link:before,
+h2:hover .anchor .octicon-link:before,
+h3:hover .anchor .octicon-link:before,
+h4:hover .anchor .octicon-link:before,
+h5:hover .anchor .octicon-link:before,
+h6:hover .anchor .octicon-link:before {
+ width: 16px;
+ height: 16px;
+ content: ' ';
+ display: inline-block;
+ background-color: currentColor;
+ -webkit-mask-image: url("data:image/svg+xml,");
+ mask-image: url("data:image/svg+xml,");
+}
+
+details,
+figcaption,
+figure {
+ display: block;
+}
+
+summary {
+ display: list-item;
+}
+
+[hidden] {
+ display: none !important;
+}
+
+a {
+ background-color: transparent;
+ color: #0969da;
+ text-decoration: none;
+}
+
+abbr[title] {
+ border-bottom: none;
+ -webkit-text-decoration: underline dotted;
+ text-decoration: underline dotted;
+}
+
+b,
+strong {
+ font-weight: 600;
+}
+
+dfn {
+ font-style: italic;
+}
+
+h1 {
+ margin: .67em 0;
+ font-weight: 600;
+ padding-bottom: .3em;
+ font-size: 2em;
+ border-bottom: 1px solid #d0d7deb3;
+}
+
+mark {
+ background-color: #fff8c5;
+ color: #1f2328;
+}
+
+small {
+ font-size: 90%;
+}
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+img {
+ border-style: none;
+ max-width: 100%;
+ box-sizing: content-box;
+ background-color: #ffffff;
+}
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace;
+ font-size: 1em;
+}
+
+figure {
+ margin: 1em 40px;
+}
+
+hr {
+ box-sizing: content-box;
+ overflow: hidden;
+ background: transparent;
+ border-bottom: 1px solid #d0d7deb3;
+ height: .25em;
+ padding: 0;
+ margin: 24px 0;
+ background-color: #d0d7de;
+ border: 0;
+}
+
+input {
+ font: inherit;
+ margin: 0;
+ overflow: visible;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+[type=button],
+[type=reset],
+[type=submit] {
+ -webkit-appearance: button;
+ appearance: button;
+}
+
+[type=checkbox],
+[type=radio] {
+ box-sizing: border-box;
+ padding: 0;
+}
+
+[type=number]::-webkit-inner-spin-button,
+[type=number]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+[type=search]::-webkit-search-cancel-button,
+[type=search]::-webkit-search-decoration {
+ -webkit-appearance: none;
+ appearance: none;
+}
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: .54;
+}
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ appearance: button;
+ font: inherit;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+::placeholder {
+ color: #636c76;
+ opacity: 1;
+}
+
+hr::before {
+ display: table;
+ content: "";
+}
+
+hr::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ display: block;
+ width: max-content;
+ max-width: 100%;
+ overflow: auto;
+}
+
+td,
+th {
+ padding: 0;
+}
+
+details summary {
+ cursor: pointer;
+}
+
+details:not([open])>*:not(summary) {
+ display: none;
+}
+
+a:focus,
+[role=button]:focus,
+input[type=radio]:focus,
+input[type=checkbox]:focus {
+ outline: 2px solid #0969da;
+ outline-offset: -2px;
+ box-shadow: none;
+}
+
+a:focus:not(:focus-visible),
+[role=button]:focus:not(:focus-visible),
+input[type=radio]:focus:not(:focus-visible),
+input[type=checkbox]:focus:not(:focus-visible) {
+ outline: solid 1px transparent;
+}
+
+a:focus-visible,
+[role=button]:focus-visible,
+input[type=radio]:focus-visible,
+input[type=checkbox]:focus-visible {
+ outline: 2px solid #0969da;
+ outline-offset: -2px;
+ box-shadow: none;
+}
+
+a:not([class]):focus,
+a:not([class]):focus-visible,
+input[type=radio]:focus,
+input[type=radio]:focus-visible,
+input[type=checkbox]:focus,
+input[type=checkbox]:focus-visible {
+ outline-offset: 0;
+}
+
+kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 11px ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ line-height: 10px;
+ color: #1f2328;
+ vertical-align: middle;
+ background-color: #f6f8fa;
+ border: solid 1px #afb8c133;
+ border-bottom-color: #afb8c133;
+ border-radius: 6px;
+ box-shadow: inset 0 -1px 0 #afb8c133;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin-top: 24px;
+ margin-bottom: 16px;
+ font-weight: 600;
+ line-height: 1.25;
+}
+
+h2 {
+ font-weight: 600;
+ padding-bottom: .3em;
+ font-size: 1.5em;
+ border-bottom: 1px solid #d0d7deb3;
+}
+
+h3 {
+ font-weight: 600;
+ font-size: 1.25em;
+}
+
+h4 {
+ font-weight: 600;
+ font-size: 1em;
+}
+
+h5 {
+ font-weight: 600;
+ font-size: .875em;
+}
+
+h6 {
+ font-weight: 600;
+ font-size: .85em;
+ color: #636c76;
+}
+
+p {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+
+blockquote {
+ margin: 0;
+ padding: 0 1em;
+ color: #636c76;
+ border-left: .25em solid #d0d7de;
+}
+
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-left: 2em;
+}
+
+ol ol,
+ul ol {
+ list-style-type: lower-roman;
+}
+
+ul ul ol,
+ul ol ol,
+ol ul ol,
+ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+dd {
+ margin-left: 0;
+}
+
+tt,
+code,
+samp {
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ font-size: 12px;
+}
+
+pre {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
+ font-size: 12px;
+ word-wrap: normal;
+}
+
+.octicon {
+ display: inline-block;
+ overflow: visible !important;
+ vertical-align: text-bottom;
+ fill: currentColor;
+}
+
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+ margin: 0;
+ -webkit-appearance: none;
+ appearance: none;
+}
+
+.mr-2 {
+ margin-right: 0.5rem !important;
+}
+
+.markdown-body::before {
+ display: table;
+ content: "";
+}
+
+.markdown-body::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+.markdown-body>*:first-child {
+ margin-top: 0 !important;
+}
+
+.markdown-body>*:last-child {
+ margin-bottom: 0 !important;
+}
+
+a:not([href]) {
+ color: inherit;
+ text-decoration: none;
+}
+
+.absent {
+ color: #d1242f;
+}
+
+.anchor {
+ float: left;
+ padding-right: 4px;
+ margin-left: -20px;
+ line-height: 1;
+}
+
+.anchor:focus {
+ outline: none;
+}
+
+p,
+blockquote,
+ul,
+ol,
+dl,
+table,
+pre,
+details {
+ margin-top: 0;
+ margin-bottom: 16px;
+}
+
+blockquote>:first-child {
+ margin-top: 0;
+}
+
+blockquote>:last-child {
+ margin-bottom: 0;
+}
+
+h1 .octicon-link,
+h2 .octicon-link,
+h3 .octicon-link,
+h4 .octicon-link,
+h5 .octicon-link,
+h6 .octicon-link {
+ color: #1f2328;
+ vertical-align: middle;
+ visibility: hidden;
+}
+
+h1:hover .anchor,
+h2:hover .anchor,
+h3:hover .anchor,
+h4:hover .anchor,
+h5:hover .anchor,
+h6:hover .anchor {
+ text-decoration: none;
+}
+
+h1:hover .anchor .octicon-link,
+h2:hover .anchor .octicon-link,
+h3:hover .anchor .octicon-link,
+h4:hover .anchor .octicon-link,
+h5:hover .anchor .octicon-link,
+h6:hover .anchor .octicon-link {
+ visibility: visible;
+}
+
+h1 tt,
+h1 code,
+h2 tt,
+h2 code,
+h3 tt,
+h3 code,
+h4 tt,
+h4 code,
+h5 tt,
+h5 code,
+h6 tt,
+h6 code {
+ padding: 0 .2em;
+ font-size: inherit;
+}
+
+summary h1,
+summary h2,
+summary h3,
+summary h4,
+summary h5,
+summary h6 {
+ display: inline-block;
+}
+
+summary h1 .anchor,
+summary h2 .anchor,
+summary h3 .anchor,
+summary h4 .anchor,
+summary h5 .anchor,
+summary h6 .anchor {
+ margin-left: -40px;
+}
+
+summary h1,
+summary h2 {
+ padding-bottom: 0;
+ border-bottom: 0;
+}
+
+ul.no-list,
+ol.no-list {
+ padding: 0;
+ list-style-type: none;
+}
+
+ol[type="a s"] {
+ list-style-type: lower-alpha;
+}
+
+ol[type="A s"] {
+ list-style-type: upper-alpha;
+}
+
+ol[type="i s"] {
+ list-style-type: lower-roman;
+}
+
+ol[type="I s"] {
+ list-style-type: upper-roman;
+}
+
+ol[type="1"] {
+ list-style-type: decimal;
+}
+
+div>ol:not([type]) {
+ list-style-type: decimal;
+}
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+li>p {
+ margin-top: 16px;
+}
+
+li+li {
+ margin-top: .25em;
+}
+
+dl {
+ padding: 0;
+}
+
+dl dt {
+ padding: 0;
+ margin-top: 16px;
+ font-size: 1em;
+ font-style: italic;
+ font-weight: 600;
+}
+
+dl dd {
+ padding: 0 16px;
+ margin-bottom: 16px;
+}
+
+table th {
+ font-weight: 600;
+}
+
+table th,
+table td {
+ padding: 6px 13px;
+ border: 1px solid #d0d7de;
+}
+
+table td>:last-child {
+ margin-bottom: 0;
+}
+
+table tr {
+ background-color: #ffffff;
+ border-top: 1px solid #d0d7deb3;
+}
+
+table tr:nth-child(2n) {
+ background-color: #f6f8fa;
+}
+
+table img {
+ background-color: transparent;
+}
+
+img[align=right] {
+ padding-left: 20px;
+}
+
+img[align=left] {
+ padding-right: 20px;
+}
+
+.emoji {
+ max-width: none;
+ vertical-align: text-top;
+ background-color: transparent;
+}
+
+span.frame {
+ display: block;
+ overflow: hidden;
+}
+
+span.frame>span {
+ display: block;
+ float: left;
+ width: auto;
+ padding: 7px;
+ margin: 13px 0 0;
+ overflow: hidden;
+ border: 1px solid #d0d7de;
+}
+
+span.frame span img {
+ display: block;
+ float: left;
+}
+
+span.frame span span {
+ display: block;
+ padding: 5px 0 0;
+ clear: both;
+ color: #1f2328;
+}
+
+span.align-center {
+ display: block;
+ overflow: hidden;
+ clear: both;
+}
+
+span.align-center>span {
+ display: block;
+ margin: 13px auto 0;
+ overflow: hidden;
+ text-align: center;
+}
+
+span.align-center span img {
+ margin: 0 auto;
+ text-align: center;
+}
+
+span.align-right {
+ display: block;
+ overflow: hidden;
+ clear: both;
+}
+
+span.align-right>span {
+ display: block;
+ margin: 13px 0 0;
+ overflow: hidden;
+ text-align: right;
+}
+
+span.align-right span img {
+ margin: 0;
+ text-align: right;
+}
+
+span.float-left {
+ display: block;
+ float: left;
+ margin-right: 13px;
+ overflow: hidden;
+}
+
+span.float-left span {
+ margin: 13px 0 0;
+}
+
+span.float-right {
+ display: block;
+ float: right;
+ margin-left: 13px;
+ overflow: hidden;
+}
+
+span.float-right>span {
+ display: block;
+ margin: 13px auto 0;
+ overflow: hidden;
+ text-align: right;
+}
+
+code,
+tt {
+ padding: .2em .4em;
+ margin: 0;
+ font-size: 85%;
+ white-space: break-spaces;
+ background-color: #afb8c133;
+ border-radius: 6px;
+}
+
+code br,
+tt br {
+ display: none;
+}
+
+del code {
+ text-decoration: inherit;
+}
+
+samp {
+ font-size: 85%;
+}
+
+pre code {
+ font-size: 100%;
+}
+
+pre>code {
+ padding: 0;
+ margin: 0;
+ word-break: normal;
+ white-space: pre;
+ background: transparent;
+ border: 0;
+}
+
+.highlight {
+ margin-bottom: 16px;
+}
+
+.highlight pre {
+ margin-bottom: 0;
+ word-break: normal;
+}
+
+.highlight pre,
+pre {
+ padding: 16px;
+ overflow: auto;
+ font-size: 85%;
+ line-height: 1.45;
+ color: #1f2328;
+ background-color: #f6f8fa;
+ border-radius: 6px;
+}
+
+pre code,
+pre tt {
+ display: inline;
+ max-width: auto;
+ padding: 0;
+ margin: 0;
+ overflow: visible;
+ line-height: inherit;
+ word-wrap: normal;
+ background-color: transparent;
+ border: 0;
+}
+
+.csv-data td,
+.csv-data th {
+ padding: 5px;
+ overflow: hidden;
+ font-size: 12px;
+ line-height: 1;
+ text-align: left;
+ white-space: nowrap;
+}
+
+.csv-data .blob-num {
+ padding: 10px 8px 9px;
+ text-align: right;
+ background: #ffffff;
+ border: 0;
+}
+
+.csv-data tr {
+ border-top: 0;
+}
+
+.csv-data th {
+ font-weight: 600;
+ background: #f6f8fa;
+ border-top: 0;
+}
+
+[data-footnote-ref]::before {
+ content: "[";
+}
+
+[data-footnote-ref]::after {
+ content: "]";
+}
+
+.footnotes {
+ font-size: 12px;
+ color: #636c76;
+ border-top: 1px solid #d0d7de;
+}
+
+.footnotes ol {
+ padding-left: 16px;
+}
+
+.footnotes ol ul {
+ display: inline-block;
+ padding-left: 16px;
+ margin-top: 16px;
+}
+
+.footnotes li {
+ position: relative;
+}
+
+.footnotes li:target::before {
+ position: absolute;
+ top: -8px;
+ right: -8px;
+ bottom: -8px;
+ left: -24px;
+ pointer-events: none;
+ content: "";
+ border: 2px solid #0969da;
+ border-radius: 6px;
+}
+
+.footnotes li:target {
+ color: #1f2328;
+}
+
+.footnotes .data-footnote-backref g-emoji {
+ font-family: monospace;
+}
+
+.pl-c {
+ color: #57606a;
+}
+
+.pl-c1,
+.pl-s .pl-v {
+ color: #0550ae;
+}
+
+.pl-e,
+.pl-en {
+ color: #6639ba;
+}
+
+.pl-smi,
+.pl-s .pl-s1 {
+ color: #24292f;
+}
+
+.pl-ent {
+ color: #0550ae;
+}
+
+.pl-k {
+ color: #cf222e;
+}
+
+.pl-s,
+.pl-pds,
+.pl-s .pl-pse .pl-s1,
+.pl-sr,
+.pl-sr .pl-cce,
+.pl-sr .pl-sre,
+.pl-sr .pl-sra {
+ color: #0a3069;
+}
+
+.pl-v,
+.pl-smw {
+ color: #953800;
+}
+
+.pl-bu {
+ color: #82071e;
+}
+
+.pl-ii {
+ color: #f6f8fa;
+ background-color: #82071e;
+}
+
+.pl-c2 {
+ color: #f6f8fa;
+ background-color: #cf222e;
+}
+
+.pl-sr .pl-cce {
+ font-weight: bold;
+ color: #116329;
+}
+
+.pl-ml {
+ color: #3b2300;
+}
+
+.pl-mh,
+.pl-mh .pl-en,
+.pl-ms {
+ font-weight: bold;
+ color: #0550ae;
+}
+
+.pl-mi {
+ font-style: italic;
+ color: #24292f;
+}
+
+.pl-mb {
+ font-weight: bold;
+ color: #24292f;
+}
+
+.pl-md {
+ color: #82071e;
+ background-color: #ffebe9;
+}
+
+.pl-mi1 {
+ color: #116329;
+ background-color: #dafbe1;
+}
+
+.pl-mc {
+ color: #953800;
+ background-color: #ffd8b5;
+}
+
+.pl-mi2 {
+ color: #eaeef2;
+ background-color: #0550ae;
+}
+
+.pl-mdr {
+ font-weight: bold;
+ color: #8250df;
+}
+
+.pl-ba {
+ color: #57606a;
+}
+
+.pl-sg {
+ color: #8c959f;
+}
+
+.pl-corl {
+ text-decoration: underline;
+ color: #0a3069;
+}
+
+[role=button]:focus:not(:focus-visible),
+[role=tabpanel][tabindex="0"]:focus:not(:focus-visible),
+button:focus:not(:focus-visible),
+summary:focus:not(:focus-visible),
+a:focus:not(:focus-visible) {
+ outline: none;
+ box-shadow: none;
+}
+
+[tabindex="0"]:focus:not(:focus-visible),
+details-dialog:focus:not(:focus-visible) {
+ outline: none;
+}
+
+g-emoji {
+ display: inline-block;
+ min-width: 1ch;
+ font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
+ font-size: 1em;
+ font-style: normal !important;
+ font-weight: 400;
+ line-height: 1;
+ vertical-align: -0.075em;
+}
+
+g-emoji img {
+ width: 1em;
+ height: 1em;
+}
+
+.task-list-item {
+ list-style-type: none;
+}
+
+.task-list-item label {
+ font-weight: 400;
+}
+
+.task-list-item.enabled label {
+ cursor: pointer;
+}
+
+.task-list-item+.task-list-item {
+ margin-top: 0.25rem;
+}
+
+.task-list-item .handle {
+ display: none;
+}
+
+.task-list-item-checkbox {
+ margin: 0 .2em .25em -1.4em;
+ vertical-align: middle;
+}
+
+.contains-task-list:dir(rtl) .task-list-item-checkbox {
+ margin: 0 -1.6em .25em .2em;
+}
+
+.contains-task-list {
+ position: relative;
+}
+
+.contains-task-list:hover .task-list-item-convert-container,
+.contains-task-list:focus-within .task-list-item-convert-container {
+ display: block;
+ width: auto;
+ height: 24px;
+ overflow: visible;
+ clip: auto;
+}
+
+::-webkit-calendar-picker-indicator {
+ filter: invert(50%);
+}
+
+.markdown-alert {
+ padding: 0.5rem 1rem;
+ margin-bottom: 1rem;
+ color: inherit;
+ border-left: .25em solid #d0d7de;
+}
+
+.markdown-alert>:first-child {
+ margin-top: 0;
+}
+
+.markdown-alert>:last-child {
+ margin-bottom: 0;
+}
+
+.markdown-alert .markdown-alert-title {
+ display: flex;
+ font-weight: 500;
+ align-items: center;
+ line-height: 1;
+}
+
+.markdown-alert.markdown-alert-note {
+ border-left-color: #0969da;
+}
+
+.markdown-alert.markdown-alert-note .markdown-alert-title {
+ color: #0969da;
+}
+
+.markdown-alert.markdown-alert-important {
+ border-left-color: #8250df;
+}
+
+.markdown-alert.markdown-alert-important .markdown-alert-title {
+ color: #8250df;
+}
+
+.markdown-alert.markdown-alert-warning {
+ border-left-color: #bf8700;
+}
+
+.markdown-alert.markdown-alert-warning .markdown-alert-title {
+ color: #9a6700;
+}
+
+.markdown-alert.markdown-alert-tip {
+ border-left-color: #1a7f37;
+}
+
+.markdown-alert.markdown-alert-tip .markdown-alert-title {
+ color: #1a7f37;
+}
+
+.markdown-alert.markdown-alert-caution {
+ border-left-color: #cf222e;
+}
+
+.markdown-alert.markdown-alert-caution .markdown-alert-title {
+ color: #d1242f;
+}
+
+.markdown-body>*:first-child>.heading-element:first-child {
+ margin-top: 0 !important;
+}
diff --git a/inst/rmarkdown/templates/reprex_document/resources/r.xml b/inst/rmarkdown/templates/reprex_document/resources/r.xml
new file mode 100644
index 00000000..143cbccf
--- /dev/null
+++ b/inst/rmarkdown/templates/reprex_document/resources/r.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+ - for
+ - in
+ - next
+ - break
+ - while
+ - repeat
+ - if
+ - else
+ - switch
+ - function
+
+
+ - TRUE
+ - FALSE
+ - NULL
+ - NA
+ - NA_integer_
+ - NA_real_
+ - NA_complex_
+ - NA_character_
+ - Inf
+ - NaN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/inst/rmarkdown/templates/reprex_document/resources/starry-nights-dark.theme b/inst/rmarkdown/templates/reprex_document/resources/starry-nights-dark.theme
new file mode 100644
index 00000000..5a1c7932
--- /dev/null
+++ b/inst/rmarkdown/templates/reprex_document/resources/starry-nights-dark.theme
@@ -0,0 +1,211 @@
+{
+ "text-color": null,
+ "background-color": null,
+ "line-number-color": "#aaaaaa",
+ "line-number-background-color": null,
+ "text-styles": {
+ "Alert": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Annotation": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Attribute": {
+ "text-color": "#7ee787",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BaseN": {
+ "text-color": "#79c0ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BuiltIn": {
+ "text-color": "#d2a8ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Char": {
+ "text-color": "#a5d6ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Comment": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "CommentVar": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Constant": {
+ "text-color": "#79c0ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "ControlFlow": {
+ "text-color": "#ff7b72",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DataType": {
+ "text-color": "#79c0ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DecVal": {
+ "text-color": "#79c0ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Documentation": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Error": {
+ "text-color": "#f0f6fc",
+ "background-color": "#8e1519",
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Extension": {
+ "text-color": "#d2a8ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Float": {
+ "text-color": "#79c0ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Function": {
+ "text-color": "#d2a8ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Import": {
+ "text-color": "#f0f6fc",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Information": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Keyword": {
+ "text-color": "#ff7b72",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Operator": {
+ "text-color": "#ff7b72",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Others": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Preprocessor": {
+ "text-color": "#ff7b72",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialChar": {
+ "text-color": "#f0f6fc",
+ "background-color": "#b62324",
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialString": {
+ "text-color": "#7ee787",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "String": {
+ "text-color": "#a5d6ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Variable": {
+ "text-color": "#ffa657",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "VerbatimString": {
+ "text-color": "#a5d6ff",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Warning": {
+ "text-color": "#9198a1",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ }
+ }
+}
diff --git a/inst/rmarkdown/templates/reprex_document/resources/starry-nights-light.theme b/inst/rmarkdown/templates/reprex_document/resources/starry-nights-light.theme
new file mode 100644
index 00000000..a00b776a
--- /dev/null
+++ b/inst/rmarkdown/templates/reprex_document/resources/starry-nights-light.theme
@@ -0,0 +1,211 @@
+{
+ "text-color": null,
+ "background-color": null,
+ "line-number-color": "#aaaaaa",
+ "line-number-background-color": null,
+ "text-styles": {
+ "Alert": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Annotation": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Attribute": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BaseN": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "BuiltIn": {
+ "text-color": "#6639ba",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Char": {
+ "text-color": "#0a3069",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Comment": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "CommentVar": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Constant": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "ControlFlow": {
+ "text-color": "#cf222e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DataType": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "DecVal": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Documentation": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Error": {
+ "text-color": "#f6f8fa",
+ "background-color": "#82071e",
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Extension": {
+ "text-color": "#6639ba",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Float": {
+ "text-color": "#0550ae",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Function": {
+ "text-color": "#6639ba",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Import": {
+ "text-color": "#1f2328",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Information": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Keyword": {
+ "text-color": "#cf222e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Operator": {
+ "text-color": "#cf222e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Others": {
+ "text-color": null,
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Preprocessor": {
+ "text-color": "#cf222e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialChar": {
+ "text-color": "#f6f8fa",
+ "background-color": "#cf222e",
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "SpecialString": {
+ "text-color": "#116329",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "String": {
+ "text-color": "#0a3069",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Variable": {
+ "text-color": "#953800",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "VerbatimString": {
+ "text-color": "#0a3069",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ },
+ "Warning": {
+ "text-color": "#59636e",
+ "background-color": null,
+ "bold": false,
+ "italic": false,
+ "underline": false
+ }
+ }
+}