@@ -38,32 +38,32 @@ for (const link of toc.match(/<a.*?>/g)) {
3838 . replace ( / [ \s \S ] * ?i d = " t o c " [ ^ > ] * > \s * < \w + > .* ?< \/ \w + > \s * ( < u l > \s * ) ? / , '' )
3939 // Prefix TOC links with current module name
4040 . replace ( / < a h r e f = " # (? ! D E P [ 0 - 9 ] { 4 } ) ( [ ^ " ] + ) " / g, ( match , anchor ) => {
41- return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"pl-s1">${ moduleName } _${ anchor } "`;
41+ return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"x x-first x-last">all_ ${ moduleName } _${ anchor } "`;
4242 } ) ;
4343
4444 apicontent += '<section>' + data . slice ( match . index + match [ 0 ] . length )
4545 . replace ( / < ! - - A P I E N D - - > [ \s \S ] * / , '</section>' )
4646 // Prefix all in-page anchor marks with module name
4747 . replace ( / < a c l a s s = " m a r k " h r e f = " # ( [ ^ " ] + ) " i d = " ( [ ^ " ] + ) " / g, ( match , anchor , id ) => {
4848 if ( anchor !== id ) throw new Error ( `Mark does not match: ${ anchor } should match ${ id } ` ) ;
49- return `<a class="mark" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"pl-s1">${ moduleName } _${ anchor } " id="${ moduleName } _${ anchor } "`;
49+ return `<a class="mark" href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"x x-first x-last">all_ ${ moduleName } _${ anchor } " id="all_ ${ moduleName } _${ anchor } "`;
5050 } )
5151 // Prefix all in-page links with current module name
5252 . replace ( / < a h r e f = " # (? ! D E P [ 0 - 9 ] { 4 } ) ( [ ^ " ] + ) " / g, ( match , anchor ) => {
53- return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"pl-s1">${ moduleName } _${ anchor } "`;
53+ return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"x x-first x-last">all_ ${ moduleName } _${ anchor } "`;
5454 } )
5555 // Update footnote id attributes on anchors
5656 . 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="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2F%3Cspan+class%3D"pl-s1">${ href } " id="${ moduleName } _${ id } "`;
57+ return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2F%3Cspan+class%3D"pl-s1">${ href } " id="all_ ${ moduleName } _${ id } "`;
5858 } )
5959 // 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 } "` ;
60+ . replace ( / < ( \S + ) i d = " ( u s e r - c o n t e n t - f n [ ^ " ] + ) " / g, ( match , tagName , id ) => {
61+ return `<${ tagName } id="all_ ${ moduleName } _${ id } "` ;
6262 } )
6363 // Prefix all links to other docs modules with those module names
6464 . replace ( / < a h r e f = " ( ( \w [ ^ # " ] * ) \. h t m l ) # / g, ( match , href , linkModule ) => {
6565 if ( ! htmlFiles . includes ( href ) ) return match ;
66- return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"pl-s1">${ linkModule } _`;
66+ return `<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fcommit%2Fc12cbf2020%23%3Cspan+class%3D"x x-first x-last">all_ ${ linkModule } _`;
6767 } )
6868 . trim ( ) + '\n' ;
6969
0 commit comments