I hereby claim:
- I am cderv on github.
- I am cderv (https://keybase.io/cderv) on keybase.
- I have a public key ASAE8lFNAkDnHi-n8qB7OSMzLrI61m9NU4sNfoKkMjjyYQo
To claim this, I am signing this object:
| #! /bin/bash | |
| # Using new API https://dailies.rstudio.com/json-api/ | |
| url=$(curl -s https://dailies.rstudio.com/rstudio/latest/index.json | jq -r '.products.server.platforms.bionic.link') | |
| wget $url | |
| sudo dpkg -i $(basename $url) | |
| rm $(basename $url) |
I hereby claim:
To claim this, I am signing this object:
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE language SYSTEM "language.dtd"> | |
| <!-- Kate 2.5 (KDE 3.5) highlighting module for R | |
| based on an earlier version by E.L. Willighagen. Code folding code by Ben Goodrich | |
| version 2.0: (c) 2006 Thomas Friedrichsmeier, Arne Henningsen, and the RKWard Team | |
| license: GPL v2 | |
| Kate : http://kate.kde.org/ | |
| R : http://www.r-project.org/ | |
| RKWard : http://rkward.kde.org/ | |
| --> |
pandoc.exe: Cannot decode byte '\x92': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream
It seems like what is sent to Pandoc is not ok.
| # Check pandoc version file | |
| devtools::load_all() | |
| library(dplyr) | |
| library(purrr) | |
| library(tidyr) | |
| releases <- pandoc_releases() | |
| releases2 <- map(releases, "[[", c("tag_name")) |
| pandoc_list_extension <- function(format = "markdown") { | |
| res <- processx::run(rmarkdown::pandoc_exec(), c("--list-extension", format)) | |
| tmp_file <- tempfile() | |
| on.exit(unlink(tmp_file)) | |
| brio::write_file(res$stdout, tmp_file) | |
| ext <- brio::read_lines(tmp_file) | |
| tibble::tibble( | |
| format = format, | |
| extensions = gsub("^[-+]", "", extensions), | |
| default = ifelse(gsub("^([-+]{1}).*", "\\1", ext) == "+", TRUE, FALSE) |
| --- | |
| title: "test" | |
| output: | |
| html_document: | |
| self_contained: false | |
| includes: | |
| in_header: head.html | |
| --- | |
| <!-- creating header file to insert in-header. mathjax config seems to be required --> |
| --[[ | |
| This function tests the pandoc version againt a target version | |
| For Pandoc 2.7.3, PANDOC_VERSION >= "2.8" would be enough but before 2.7.3 | |
| it is a table object | |
| ]] | |
| local function pandocAvailable(target) | |
| -- this function only work for Pandoc 2.1 and above. It returns false is not | |
| if not PANDOC_VERSION then return false end | |
| assert(target, "No target version specified in pandocAvailable.") | |
| -- checking each version number |
| -- MIT LICENCE - 2021 Christophe Dervieux | |
| -- Only works with Pandoc 2.1.2+ because of PANDOC_SCRIPT_FILE availability | |
| function import(script) | |
| local PATH_SEP = package.config:sub(1,1) | |
| local path = PANDOC_SCRIPT_FILE:match("(.*"..PATH_SEP..")") | |
| dofile(path .. script) | |
| end | |
| import("utils.lua") |
| all: test-gfm2.md test-gfm.md | |
| test-gfm2.md: test.md | |
| pandoc -f markdown+gfm_auto_identifiers -t gfm -s --table-of-contents -o $@ $< | |
| test-gfm.md: test.md | |
| pandoc -f markdown -t gfm -s --table-of-contents -o $@ $< |