Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: litedown
Type: Package
Title: A Lightweight Version of R Markdown
Version: 0.7
Version: 0.7.1
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666", URL = "https://yihui.org")),
person("Tim", "Taylor", role = "ctb", comment = c(ORCID = "0000-0002-8587-7113")),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CHANGES IN litedown VERSION 0.7
# CHANGES IN litedown VERSION 0.7.1

- `pkg_manual()` will exclude help pages with the keyword `internal` (thanks, @TimTaylor, #78).

Expand All @@ -12,6 +12,10 @@

- Deleted vignettes `markdown-examples` and `markdown-output`. They are rendered on the package site now: https://git.yihui.org/litedown/examples/test-options.html

- Allows absolute paths in filename dependencies in `vest()`.

- Allows `meta` to be specified in chunk options.

# CHANGES IN litedown VERSION 0.6

- Added a Markdown rendering option `offline` to download web resources when this option is set to true, so that the HTML output can be viewed offline (thanks, @TimTaylor, #73). See https://yihui.org/litedown/#sec:offline for more info.
Expand Down
1 change: 1 addition & 0 deletions R/mark.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ mark = function(input, output = NULL, text = NULL, options = NULL, meta = list()
yaml[intersect(names(yaml), top_meta)],
yaml_field(yaml, format),
list(generator = I(paste('litedown', packageVersion('litedown')))),
reactor("meta"),
meta
)
meta = normalize_meta(meta)
Expand Down
3 changes: 3 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ gen_tag = function(
} else stop("The file extension '", ext, "' is not supported.")
is_web = is_https(x)
is_rel = !is_web && is_rel_path(x)
is_abs = !is_web && is_abs_path(x)
if (is_web && embed_https && xfun::url_filename(x) == 'MathJax.js') {
warning('MathJax.js cannot be embedded. Please use MathJax v3 instead.')
embed_https = FALSE
Expand All @@ -1302,6 +1303,8 @@ gen_tag = function(
x, offline, handler = function(code) resolve_url(x, code, ext, FALSE)
)
sprintf(t1, x)
} else if (is_abs) {
one_string(c(t2[1], read_utf8(x), t2[2]))
} else {
# embedding for other cases
one_string(c(t2[1], resolve_external(x, is_web, ext), t2[2]))
Expand Down