File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,8 @@ function process_example(
173
173
174
174
const [ , , _slug ] = / ^ ( \d + ) - ( .+ ) $ / . exec ( name ) ;
175
175
const slug = make_slug ( _slug , seen_slugs ) ;
176
-
177
176
const _example = {
178
- name : meta . title ,
177
+ name : meta . title || slug ,
179
178
slug : slug ,
180
179
} ;
181
180
@@ -202,10 +201,11 @@ export async function transform_examples(
202
201
const [ files , meta ] = extract_meta ( content ) ;
203
202
const [ example_full , example_list ] = process_example ( files , seen_slugs ) ;
204
203
204
+ const [ , , _slug ] = / ^ ( \d + ) - ( .+ ) $ / . exec ( name ) ;
205
205
example_full . forEach ( ( v ) => full . push ( v ) ) ;
206
206
207
207
return {
208
- name : meta . title ,
208
+ name : meta . title || make_slug ( _slug , new Map ( ) ) ,
209
209
examples : example_list ,
210
210
} ;
211
211
} ) ;
You can’t perform that action at this time.
0 commit comments