Closed DrChainsaw closed 2 years ago
(to get uniform styling)
What do you mean with this?
What do you mean with this?
I seem to get different syntax highlighting with the default fences (@example
?) for DocumenterFlavor
compared to normal (common?) markdown with julia
fences. Some parts of the docs are not litterate docs and I want syntax highlighting to look the same in all docs.
You are not using Documenter? Documenter should replace @example
with julia
so that sounds strange.
You are not using Documenter?
I am using Documenter. Perhaps something is malformed in my files then? I'll have another look at it and will open a separate issue if appropriate.
Hi, I have the same problem with the nothing #hide
, which should not be here.
Here is my MWE:
using Pkg
cd(@__DIR__)
pkg"activate ."
using Literate, Documenter
open("script.jl", "w+") do io
write(io, """
a = 2 + 2;
""")
end
Literate.markdown("script.jl", "src", execute=true, credit=false)
makedocs(
sitename = "Test",
pages = [
"Script from Literate" => "script.md",
],
)
the generated src/script.md
looks like this
```@meta
EditURL = "<unknown>/script.jl"
a = 2 + 2;
nothing #hide
and then the generated html page looks like this:
![image](https://user-images.githubusercontent.com/5525771/143589877-0af257e1-e313-410b-b03b-5e9b1968af66.png)
I think the problem is that #hide
works only in examples, as stated in docs https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block
not in the ```julia block.
Not sure where this issue belongs, but when using DocumenterFlavour with julia codefences (to get uniform styling) and semi-colons to supress output a
nothing #hide
line which shows up in the generated document:^ this shows up in generated webpage
This page was generated using Literate.jl.