Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/literate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Pkg.activate(EXAMPLEPATH)
Pkg.instantiate()
using Literate: Literate

# Add link to nbviewer below the first heading of level 1
function preprocess(content)
# Add link to nbviewer below the first heading of level 1
sub = SubstitutionString(
"""
#md # ```@meta
Expand All @@ -35,7 +35,12 @@ function preprocess(content)
#
""",
)
return replace(content, r"^# # [^\n]*"m => sub; count=1)
content = replace(content, r"^# # [^\n]*"m => sub; count=1)

# remove VSCode `##` block delimiter lines
content = replace(content, r"^##$."ms => "")

return content
end

# Convert to markdown and notebook
Expand Down
Loading