File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,8 @@ export interface GenerateOptions {
283283 ) : string | undefined ;
284284 /** Function to strip markdown. */
285285 markdownStripper ( md : string ) : string ;
286+ /** Prefix for IDs of elements. */
287+ idPrefix ?: string ;
286288}
287289
288290const defaultUsageComposer : UsageComposer = {
@@ -331,6 +333,7 @@ export async function generateHtml(
331333 options . markdownRenderer ,
332334 options . markdownStripper ,
333335 options . headInject ,
336+ options . idPrefix ,
334337 docNodesByUrl ,
335338 false ,
336339 ) ;
@@ -368,6 +371,7 @@ export async function generateHtmlAsJSON(
368371 options . markdownRenderer ,
369372 options . markdownStripper ,
370373 options . headInject ,
374+ options . idPrefix ,
371375 docNodesByUrl ,
372376 true ,
373377 ) ;
Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ pub fn generate_html(
292292 markdown_renderer : js_sys:: Function ,
293293 markdown_stripper : js_sys:: Function ,
294294 head_inject : Option < js_sys:: Function > ,
295+ id_prefix : Option < String > ,
295296
296297 doc_nodes_by_url : JsValue ,
297298
@@ -317,6 +318,7 @@ pub fn generate_html(
317318 markdown_renderer,
318319 markdown_stripper,
319320 head_inject,
321+ id_prefix,
320322 doc_nodes_by_url,
321323 json,
322324 )
@@ -532,6 +534,7 @@ fn generate_html_inner(
532534 markdown_renderer : js_sys:: Function ,
533535 markdown_stripper : js_sys:: Function ,
534536 head_inject : Option < js_sys:: Function > ,
537+ id_prefix : Option < String > ,
535538
536539 doc_nodes_by_url : JsValue ,
537540
@@ -642,6 +645,7 @@ fn generate_html_inner(
642645 markdown_renderer,
643646 markdown_stripper,
644647 head_inject,
648+ id_prefix,
645649 } ,
646650 doc_nodes_by_url,
647651 ) ?;
You can’t perform that action at this time.
0 commit comments