Skip to content

Commit

Permalink
Merge 19c32b5 into 10ad9ee
Browse files Browse the repository at this point in the history
  • Loading branch information
st-- committed Jul 8, 2021
2 parents 10ad9ee + 19c32b5 commit 084930b
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 294 deletions.
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

0 comments on commit 084930b

Please sign in to comment.