File tree 2 files changed +39
-35
lines changed
2 files changed +39
-35
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
import { z } from " astro:content" ;
3
+ import { marked } from " marked" ;
3
4
import { slug } from " github-slugger" ;
4
5
5
6
type Props = z .infer <typeof props >;
@@ -15,7 +16,7 @@ const Heading = `h${depth}`;
15
16
---
16
17
17
18
<div tabindex =" -1" class =`heading-wrapper level-h${depth }` >
18
- <Heading id ={ slug (title )} > { title } </ Heading >
19
+ <Heading id ={ slug (title )} set:html = { marked . parseInline ( title ) } / >
19
20
<a class =" anchor-link" href ={ ` #${slug (title )} ` } >
20
21
<span aria-hidden class =" anchor-icon" >
21
22
<svg width =" 16" height =" 16" viewBox =" 0 0 24 24" >
Original file line number Diff line number Diff line change @@ -21,40 +21,43 @@ if (experimental) {
21
21
flags .map (
22
22
async (entry ) => {
23
23
const { Content } = await entry .render ();
24
- <>
25
- <AnchorHeading title = { entry .data .name } depth = { 3 } />
26
- <table >
27
- { entry .data .enable_date && (
28
- <tr >
29
- <td >
30
- <strong >Default as of</strong >
31
- </td >
32
- <td >{ entry .data .enable_date } </td >
33
- </tr >
34
- )}
35
- { entry .data .enable_flag && (
36
- <tr >
37
- <td >
38
- <strong >Flag to enable</strong >
39
- </td >
40
- <td >
41
- <code >{ entry .data .enable_flag } </code >
42
- </td >
43
- </tr >
44
- )}
45
- { entry .data .disable_flag && (
46
- <tr >
47
- <td >
48
- <strong >Flag to disable</strong >
49
- </td >
50
- <td >
51
- <code >{ entry .data .disable_flag } </code >
52
- </td >
53
- </tr >
54
- )}
55
- </table >
56
- <Content />
57
- </>
24
+
25
+ return (
26
+ <>
27
+ <AnchorHeading title = { entry .data .name } depth = { 3 } />
28
+ <table >
29
+ { entry .data .enable_date && (
30
+ <tr >
31
+ <td >
32
+ <strong >Default as of</strong >
33
+ </td >
34
+ <td >{ entry .data .enable_date } </td >
35
+ </tr >
36
+ )}
37
+ { entry .data .enable_flag && (
38
+ <tr >
39
+ <td >
40
+ <strong >Flag to enable</strong >
41
+ </td >
42
+ <td >
43
+ <code >{ entry .data .enable_flag } </code >
44
+ </td >
45
+ </tr >
46
+ )}
47
+ { entry .data .disable_flag && (
48
+ <tr >
49
+ <td >
50
+ <strong >Flag to disable</strong >
51
+ </td >
52
+ <td >
53
+ <code >{ entry .data .disable_flag } </code >
54
+ </td >
55
+ </tr >
56
+ )}
57
+ </table >
58
+ <Content />
59
+ </>
60
+ )
58
61
},
59
62
)
60
63
}
You can’t perform that action at this time.
0 commit comments