diff --git a/docs/src/documenter.md b/docs/src/documenter.md index fa1477c..72057b9 100644 --- a/docs/src/documenter.md +++ b/docs/src/documenter.md @@ -45,6 +45,16 @@ if we set `documenter = true`: \int f dx $$ ``` +- Whereas Documenter requires HTML blocks to be escaped + ```` + ```@raw html + ... + ``` + ```` + the output to a notebook markdown cell will be raw HTML + ``` + ... + ``` ### [`Literate.script`](@ref): - Documenter style `@ref`s and `@id` will be removed. This means that you can use diff --git a/src/Literate.jl b/src/Literate.jl index c7fe917..f7c964d 100644 --- a/src/Literate.jl +++ b/src/Literate.jl @@ -184,6 +184,8 @@ function replace_default(content, sym; # Replace Markdown stdlib math environments push!(repls, r"```math(.*?)```"s => s"$$\1$$") push!(repls, r"(? s"$\1$") + # Remove Documenter escape sequence around HTML + push!(repls, r"```@raw(\h+)html(.*?)```"s => s"\2") else # sym === :jl push!(repls, r"^#(!md|!nb|jl) "m => "") # remove leading #!md, #!nb, and #jl push!(repls, r" #(!md|!nb|jl)$"m => "") # remove trailing #!md, #!nb, and #jl