From d43a8c92ff02b53c23db871875ccb2fb49a16d86 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 18 Apr 2018 12:40:28 +0200 Subject: [PATCH] always change mathmode --- src/Examples.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Examples.jl b/src/Examples.jl index 3d295c0..419112e 100644 --- a/src/Examples.jl +++ b/src/Examples.jl @@ -312,6 +312,7 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide r"^#jl.*\n?"m => "", r".*#jl$\n?"m => "", r"^#nb "m => "", + r"```math(.*?)```"s => s"\\begin{equation}\1\\end{equation}", ] content = replace(content, repl) end @@ -321,12 +322,10 @@ function notebook(inputfile, outputdir; preprocess = identity, postprocess = ide # run some Documenter specific things if documenter # TODO: safe to do this always? - ## - replace ```math ... ``` with \begin{equation} ... \end{equation} ## - remove documenter style `@ref`s and `@id`s # TODO: remove @docs, @setup etc? Probably not, since these are complete blocks # and the user can just mark those lines with #md for repl in Pair{Any,Any}[ - r"```math(.*?)```"s => s"\\begin{equation}\1\\end{equation}", r"\[(.*?)\]\(@ref\)" => s"\1", r"\[(.*?)\]\(@ref .*?\)" => s"\1", r"\[(.*?)\]\(@id .*?\)" => s"\1",