From a97e90b1ada054283f91030f8f87c78ccb8246c7 Mon Sep 17 00:00:00 2001 From: "Luiz M. Faria" Date: Mon, 14 Oct 2024 11:40:36 +0200 Subject: [PATCH] only replace `.jl` at the end of the `input` file - Package names could contain `.jl` --- docs/make.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index fa0c35ae..a1916072 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -59,7 +59,7 @@ function generate_plaintext( return join(cell_strings, "\n\n") end -function generate_md(input; output = replace(input, ".jl" => ".md")) +function generate_md(input; output = replace(input, r"\.jl$" => ".md")) fname = basename(input) notebook = Pluto.load_notebook(input) header = @@ -84,6 +84,7 @@ function generate_md(input; output = replace(input, ".jl" => ".md")) end textcomment(text) = string("") str = generate_plaintext(notebook, "md"; header, codewrapper, textcomment) + open(output, "w") do io return write(io, str) end