vladdez
January 31, 2024, 12:05pm
1
I need something like eval=FALSE from R Markdwon. Currently I have a documentation where chunk of code when run will change my environment producing errors.
So I need it to look like a chunk of code but not run.
I use Literate.jl to transform .jl file into .md file.
In Literste I use the trick when I don’t want the code to be run to change the “codefence” to text
in Literate.markdown
:
codefence = "```text" => "```"
# To build the documentation:
# - julia --project="." make.jl
# - empty!(ARGS); include("make.jl")
# To build the documentation without running the tests:
# - julia --project="." make.jl preview
# - push!(ARGS,"preview"); include("make.jl")
# Format notes:
# # A markdown H1 title
# A non-code markdown normal line
## A comment within the code chunk
#src: line exclusive to the source code and thus filtered out unconditionally
using Test
using Documenter, Literate, BetaML
This file has been truncated. show original
But does this mean that all code is ignored?
I need all the code to be executed except for one chunk of code.
You can use a regular Markdown code snippet like this:
# ```julia
# <code goes here>
# ```
1 Like
This formula worked! Thank you!
# ```julia
# begin
# using Pkg
# Pkg.activate("FOLDER_PATH")
# Pkg.resolve()
# end
# ```