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(
173173
174174 const [ , , _slug ] = / ^ ( \d + ) - ( .+ ) $ / . exec ( name ) ;
175175 const slug = make_slug ( _slug , seen_slugs ) ;
176-
177176 const _example = {
178- name : meta . title ,
177+ name : meta . title || slug ,
179178 slug : slug ,
180179 } ;
181180
@@ -202,10 +201,11 @@ export async function transform_examples(
202201 const [ files , meta ] = extract_meta ( content ) ;
203202 const [ example_full , example_list ] = process_example ( files , seen_slugs ) ;
204203
204+ const [ , , _slug ] = / ^ ( \d + ) - ( .+ ) $ / . exec ( name ) ;
205205 example_full . forEach ( ( v ) => full . push ( v ) ) ;
206206
207207 return {
208- name : meta . title ,
208+ name : meta . title || make_slug ( _slug , new Map ( ) ) ,
209209 examples : example_list ,
210210 } ;
211211 } ) ;
You can’t perform that action at this time.
0 commit comments