File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -86,18 +86,25 @@ export async function getStaticProps() {
86
86
export type TestCaseComponentProps = TestCaseFixture & {
87
87
filename : string ;
88
88
raw : TestCaseFixture ;
89
- before : string ;
90
- during : string ;
91
- after : string ;
89
+ before : { html : string ; data : string [ ] } ;
90
+ during : { html : string ; data : string [ ] } ;
91
+ after : { html : string ; data : string [ ] } ;
92
+ debug ?: boolean ;
92
93
} ;
93
94
94
- export function App ( { data } : { data : TestCaseComponentProps [ ] } ) {
95
+ export function App ( {
96
+ data,
97
+ debug,
98
+ } : {
99
+ data : TestCaseComponentProps [ ] ;
100
+ debug ?: boolean ;
101
+ } ) {
95
102
return (
96
103
< >
97
104
< Head >
98
105
< title > Cursorless Test Case Component Page</ title >
99
106
</ Head >
100
- < TestCaseComponentPage data = { data } />
107
+ < TestCaseComponentPage data = { data } debug = { debug } />
101
108
</ >
102
109
) ;
103
110
}
Original file line number Diff line number Diff line change @@ -7,15 +7,17 @@ import type { TestCaseFixture } from "@cursorless/common";
7
7
export type TestCaseComponentProps = TestCaseFixture & {
8
8
filename : string ;
9
9
raw : TestCaseFixture ;
10
- before : string ;
11
- during : string ;
12
- after : string ;
10
+ before : { html : string ; data : string [ ] } ;
11
+ during : { html : string ; data : string [ ] } ;
12
+ after : { html : string ; data : string [ ] } ;
13
13
} ;
14
14
15
15
export function TestCaseComponentPage ( {
16
16
data,
17
+ debug,
17
18
} : {
18
19
data : TestCaseComponentProps [ ] ;
20
+ debug ?: boolean ;
19
21
} ) {
20
22
return (
21
23
< main className = "dark:text-stone-100" >
@@ -35,7 +37,9 @@ export function TestCaseComponentPage({
35
37
}
36
38
const { filename } = item ;
37
39
if ( filename ) {
38
- return < ShikiComponent data = { item } key = { item . filename } /> ;
40
+ return (
41
+ < ShikiComponent data = { item } debug = { debug } key = { item . filename } />
42
+ ) ;
39
43
} else {
40
44
return < > </ > ;
41
45
}
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ class HTMLGenerator {
159
159
const errorRendered = `<pre><code>Omitted due to errors: ${ error } </pre></code>`
160
160
htmlArray . push ( errorRendered )
161
161
}
162
- return htmlArray . join ( "" )
162
+ return { html : htmlArray . join ( "" ) , data : [ ] }
163
163
}
164
164
165
165
async generateAll ( ) {
You can’t perform that action at this time.
0 commit comments