Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	DESCRIPTION
#	NEWS.md
#	codemeta.json
  • Loading branch information
rkrug committed Jun 22, 2020
2 parents 3ffd0a2 + 18fff2c commit dacde08
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: plantuml
Type: Package
Title: Create UML Graphs using PlantUML Syntax
Version: 0.3.2
Date: 2020-06-19
Version: 0.3.3
Date: 2002-06-22
Authors@R:
c(person(given = "Rainer M.",
family = "Krug",
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

# v0.3.3
- added `plantuml.preview` option to kitr engine which will show a preview in RStudio

# 0.3.2
- Adds `mode = "wd"` to the download of `plantuml.jar` to avoid corruption on windows


# v0.3.1
- added function to register knit engine `plantuml_knit_engine_register()`
- fixed wrong behaviour when `echo = TRUE` and `eval = TRUE`
Expand Down
10 changes: 10 additions & 0 deletions R/plantuml_knit_engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' - **eps** To generate text in EPS format.
#' - **plantuml.path**: the path where the resulting files will be saved.
#' Default is the same directory as the `.Rmd` file is in. The path will be created if it does not exist.
#' - **plantuml.preview**: if `TRUE`, an inline preview will be shown in RStudio.
#' **Attention: the processing takse twice as long as without this option!**.
#'
#' Thanks to Emiliano Heyns (retorquere) for giving me the idea for this
#' functiion https://github.com/rkrug/plantuml/issues/10#issue-639795529
Expand Down Expand Up @@ -94,7 +96,15 @@ plantuml_knit_engine <- function(options) {
options = options,
out = out
)
###
if (isTRUE(options$plantuml.preview)) {
plot(
x = puml,
vector = TRUE
)
}
}

if (options$echo) {
result$code <- knitr::engine_output(
options = options,
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"codeRepository": "https://github.com/rkrug/plantuml",
"issueTracker": "https://github.com/rkrug/plantuml/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.3.2",
"version": "0.3.3",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -145,7 +145,7 @@
],
"releaseNotes": "https://github.com/rkrug/plantuml/blob/master/NEWS.md",
"readme": "https://github.com/rkrug/plantuml/blob/master/README.md",
"fileSize": "296.292KB",
"fileSize": "316.547KB",
"contIntegration": [
"https://travis-ci.org/rkrug/plantuml",
"https://codecov.io/github/rkrug/plantuml?branch=master"
Expand Down
2 changes: 2 additions & 0 deletions man/plantuml_knit_engine.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
use_with_knitr.html
9 changes: 9 additions & 0 deletions vignettes/use_with_knitr.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)

## ----setup, include=TRUE------------------------------------------------------
plantuml::plantuml_knit_engine_register()

0 comments on commit dacde08

Please sign in to comment.