-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use quarto-provided markdown if present (#154)
* use quarto-provided markdown if present * format * remove stray `display` call * add quarto integration test * refactor to not need temp file
- Loading branch information
1 parent
86f094b
commit 6248b6a
Showing
6 changed files
with
124 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```{julia} | ||
x = 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
engine: julia | ||
--- | ||
|
||
{{< include to_include.qmd >}} | ||
|
||
```{julia} | ||
y = x + 1 | ||
println("y = $y") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include("../../utilities/prelude.jl") | ||
|
||
@testset "quarto includes" begin | ||
file = | ||
joinpath(@__DIR__, "..", "..", "examples", "quarto_integration", "with_include.qmd") | ||
# TODO: use quarto_jll for integration tests once modern enough versions are available | ||
cmd = addenv( | ||
`quarto render $file --to md`, | ||
"QUARTO_JULIA_PROJECT" => normpath(joinpath(@__DIR__, "..", "..", "..")), | ||
) | ||
run(cmd) | ||
outputfile = | ||
joinpath(@__DIR__, "..", "..", "examples", "quarto_integration", "with_include.md") | ||
@test occursin("y = 2", read(outputfile, String)) | ||
rm(outputfile) | ||
end |