@@ -63,7 +63,10 @@ function enrichTableOfContents(sections: Section[]): EnrichedSection[] {
6363 const fullLink = path . join ( "/documentation" , item . link ) ;
6464 const compareLink = convertDocPathToHTML ( fullLink ) ;
6565 const htmlLinkRaw = fullLink . replace ( / \. m a l l o y n b $ / , "" ) ;
66- const htmlLink = htmlLinkRaw === "/documentation/index" ? "/documentation" : htmlLinkRaw ;
66+ const htmlLink =
67+ htmlLinkRaw === "/documentation/index"
68+ ? "/documentation"
69+ : htmlLinkRaw ;
6770 return { title : item . title , link : item . link , htmlLink, compareLink } ;
6871 } else {
6972 return enrichTableOfContents ( [ item ] ) [ 0 ] ;
@@ -141,15 +144,16 @@ const FOOTER_TEMPLATE_STRING = `
141144 <a href="{{ next.relative }}">{{ next.title }}<img src="{{ site.baseurl }}/img/next.svg" alt="next"/></a>
142145 {{/if }}
143146 </div>
144- </div>`
147+ </div>` ;
145148const FOOTER_TEMPLATE = Handlebars . compile ( FOOTER_TEMPLATE_STRING ) ;
146149
147150export function renderFooter (
148151 sections : Section [ ] ,
149152 rootPath : string ,
150153 docPath : string
151154) : string {
152- const makeFullLink = ( l : string ) => path . join ( '/documentation' , convertDocPathToHTML ( l ) ) ;
155+ const makeFullLink = ( l : string ) =>
156+ path . join ( "/documentation" , convertDocPathToHTML ( l ) ) ;
153157 const items = extractItems ( sections ) ;
154158 const thisIndex = items . findIndex (
155159 ( item ) => makeFullLink ( item . link ) === docPath
@@ -175,13 +179,17 @@ export function renderFooter(
175179
176180 return FOOTER_TEMPLATE ( {
177181 ...DEFAULT_CONTEXT ,
178- next : next ? {
179- relative : nextRelative ,
180- title : next . title
181- } : undefined ,
182- previous : previous ? {
183- relative : previousRelative ,
184- title : previous . title
185- } : undefined ,
182+ next : next
183+ ? {
184+ relative : nextRelative ,
185+ title : next . title ,
186+ }
187+ : undefined ,
188+ previous : previous
189+ ? {
190+ relative : previousRelative ,
191+ title : previous . title ,
192+ }
193+ : undefined ,
186194 } ) ;
187195}
0 commit comments