Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
fix highlight process
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nüst authored and bpross-52n committed Apr 14, 2014
1 parent 25909d9 commit 3346144
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions 52n-wps-webapp/src/main/webapp/R/scripts/highlight.R
Expand Up @@ -14,7 +14,12 @@ myLog("Start script... ")

tmpfile <- "rcode.txt"

download.file(url = rcodeurl, destfile = tempfile)
#wps.off;
rcodeurl <- "http://localhost:8080/wps/R/scripts/test_calculator.R"
#wps.on;
download.file(url = rcodeurl, destfile = tmpfile)

myLog("Downloaded script file to ", tmpfile, " in ", getwd())

# wps.off;
rcode <- 'highlight(code = rcode, format = "html",
Expand All @@ -31,8 +36,7 @@ h <- highlight(file = tmpfile, output = html, format = "html",
detective = simple_detective,
renderer = renderer_html( document = TRUE ),
parser.output = parser(input, encoding = "UTF-8"))
myLog("Saved to file ", html, " in ", getwd())

# wps.out: html, type = text,
# abstract = "highlighted html code";

myLog("Saved to file ", hcode, " in ", getwd())
# wps.out: html, type = text/html,
# abstract = "highlighted html code";

0 comments on commit 3346144

Please sign in to comment.