File tree Expand file tree Collapse file tree 3 files changed +426
-166
lines changed Open diff view settings
Expand file tree Collapse file tree 3 files changed +426
-166
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -52,6 +52,14 @@ for (const link of toc.match(/<a.*?>/g)) {
5252 . replace ( / < a h r e f = " # (? ! D E P [ 0 - 9 ] { 4 } ) ( [ ^ " ] + ) " / g, ( match , anchor ) => {
5353 return `<a href="#${ moduleName } _${ anchor } "` ;
5454 } )
55+ // Update footnote id attributes on anchors
56+ . replace ( / < a h r e f = " ( [ ^ " ] + ) " i d = " ( u s e r - c o n t e n t - f n [ ^ " ] + ) " / g, ( match , href , id ) => {
57+ return `<a href="${ href } " id="${ moduleName } _${ id } "` ;
58+ } )
59+ // Update footnote id attributes on list items
60+ . replace ( / < ( \S + ) i d = " ( u s e r - c o n t e n t - f n - \d + ) " / g, ( match , tagName , id ) => {
61+ return `<${ tagName } id="${ moduleName } _${ id } "` ;
62+ } )
5563 // Prefix all links to other docs modules with those module names
5664 . replace ( / < a h r e f = " ( ( \w [ ^ # " ] * ) \. h t m l ) # / g, ( match , href , linkModule ) => {
5765 if ( ! htmlFiles . includes ( href ) ) return match ;
You can’t perform that action at this time.
0 commit comments