File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,8 @@ export interface GenerateOptions {
283
283
) : string | undefined ;
284
284
/** Function to strip markdown. */
285
285
markdownStripper ( md : string ) : string ;
286
+ /** Prefix for IDs of elements. */
287
+ idPrefix ?: string ;
286
288
}
287
289
288
290
const defaultUsageComposer : UsageComposer = {
@@ -331,6 +333,7 @@ export async function generateHtml(
331
333
options . markdownRenderer ,
332
334
options . markdownStripper ,
333
335
options . headInject ,
336
+ options . idPrefix ,
334
337
docNodesByUrl ,
335
338
false ,
336
339
) ;
@@ -368,6 +371,7 @@ export async function generateHtmlAsJSON(
368
371
options . markdownRenderer ,
369
372
options . markdownStripper ,
370
373
options . headInject ,
374
+ options . idPrefix ,
371
375
docNodesByUrl ,
372
376
true ,
373
377
) ;
Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ pub fn generate_html(
292
292
markdown_renderer : js_sys:: Function ,
293
293
markdown_stripper : js_sys:: Function ,
294
294
head_inject : Option < js_sys:: Function > ,
295
+ id_prefix : Option < String > ,
295
296
296
297
doc_nodes_by_url : JsValue ,
297
298
@@ -317,6 +318,7 @@ pub fn generate_html(
317
318
markdown_renderer,
318
319
markdown_stripper,
319
320
head_inject,
321
+ id_prefix,
320
322
doc_nodes_by_url,
321
323
json,
322
324
)
@@ -532,6 +534,7 @@ fn generate_html_inner(
532
534
markdown_renderer : js_sys:: Function ,
533
535
markdown_stripper : js_sys:: Function ,
534
536
head_inject : Option < js_sys:: Function > ,
537
+ id_prefix : Option < String > ,
535
538
536
539
doc_nodes_by_url : JsValue ,
537
540
@@ -642,6 +645,7 @@ fn generate_html_inner(
642
645
markdown_renderer,
643
646
markdown_stripper,
644
647
head_inject,
648
+ id_prefix,
645
649
} ,
646
650
doc_nodes_by_url,
647
651
) ?;
You can’t perform that action at this time.
0 commit comments