File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,35 @@ using Random: AbstractRNG
55readme = joinpath (@__DIR__ , " .." , " README.md" )
66
77index_content = let r= read (readme, String)
8- # Clean img tags:
9- r2 = replace (r, r""" <img src="([^"]+)"[^>]*>""" => " " )
8+ # Wrap img tags in raw HTML blocks:
9+ r = replace (r, r" (<img\s +[^>]+>)" => s """
10+
11+ ```@raw html
12+ \1
13+ ```
14+
15+ """ )
16+ # Remove end img tags:
17+ r = replace (r, r" </img>" => " " )
1018 # Remove div tags:
11- r3 = replace (r2 , r" <div[^>]*>" => " " )
19+ r = replace (r , r" <div[^>]*>" => " " )
1220 # Remove end div tags:
13- r4 = replace (r3 , r" </div>" => " " )
21+ r = replace (r , r" </div>" => " " )
1422
1523 top_part = """
16- # Contents
24+ # Introduction
25+
26+ """
27+
28+ bottom_part = """
29+ ## Contents
1730
1831 ```@contents
1932 Pages = ["utils.md", "api.md", "eval.md"]
2033 ```
2134 """
2235
23- join ((top_part, r4 ), " \n " )
36+ join ((top_part, r, bottom_part ), " \n " )
2437end
2538
2639index_md = joinpath (@__DIR__ , " src" , " index.md" )
Original file line number Diff line number Diff line change 1+ # Gets generated:
2+ index.md
You can’t perform that action at this time.
0 commit comments