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
5
5
readme = joinpath (@__DIR__ , " .." , " README.md" )
6
6
7
7
index_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>" => " " )
10
18
# Remove div tags:
11
- r3 = replace (r2 , r" <div[^>]*>" => " " )
19
+ r = replace (r , r" <div[^>]*>" => " " )
12
20
# Remove end div tags:
13
- r4 = replace (r3 , r" </div>" => " " )
21
+ r = replace (r , r" </div>" => " " )
14
22
15
23
top_part = """
16
- # Contents
24
+ # Introduction
25
+
26
+ """
27
+
28
+ bottom_part = """
29
+ ## Contents
17
30
18
31
```@contents
19
32
Pages = ["utils.md", "api.md", "eval.md"]
20
33
```
21
34
"""
22
35
23
- join ((top_part, r4 ), " \n " )
36
+ join ((top_part, r, bottom_part ), " \n " )
24
37
end
25
38
26
39
index_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