@@ -169,12 +169,10 @@ function linkManPages(text) {
169
169
const displayAs = `<code>${ name } (${ number } ${ optionalCharacter } )</code>` ;
170
170
171
171
if ( BSD_ONLY_SYSCALLS . has ( name ) ) {
172
- return `${ beginning } <a href="https://www.freebsd.org/cgi/man.cgi` +
173
- `?query=${ name } &sektion=${ number } ">${ displayAs } </a>` ;
172
+ return `${ beginning } <a href="https://www.freebsd.org/cgi/man.cgi?query=${ name } &sektion=${ number } ">${ displayAs } </a>` ;
174
173
}
175
174
176
- return `${ beginning } <a href="http://man7.org/linux/man-pages/man${ number } ` +
177
- `/${ name } .${ number } ${ optionalCharacter } .html">${ displayAs } </a>` ;
175
+ return `${ beginning } <a href="http://man7.org/linux/man-pages/man${ number } /${ name } .${ number } ${ optionalCharacter } .html">${ displayAs } </a>` ;
178
176
} ) ;
179
177
}
180
178
@@ -212,17 +210,14 @@ function preprocessElements({ filename }) {
212
210
} else if ( node . type === 'code' ) {
213
211
if ( ! node . lang ) {
214
212
console . warn (
215
- `No language set in ${ filename } , ` +
216
- `line ${ node . position . start . line } ` ) ;
213
+ `No language set in ${ filename } , line ${ node . position . start . line } `
214
+ ) ;
217
215
}
218
216
const className = isJSFlavorSnippet ( node ) ?
219
217
`language-js ${ node . lang } ` :
220
218
`language-${ node . lang } ` ;
221
219
const highlighted =
222
- `<code class='${ className } '>` +
223
- ( getLanguage ( node . lang || '' ) ?
224
- highlight ( node . lang , node . value ) : node ) . value +
225
- '</code>' ;
220
+ `<code class='${ className } '>${ ( getLanguage ( node . lang || '' ) ? highlight ( node . lang , node . value ) : node ) . value } </code>` ;
226
221
node . type = 'html' ;
227
222
228
223
if ( isJSFlavorSnippet ( node ) ) {
@@ -356,8 +351,7 @@ function parseYAML(text) {
356
351
357
352
result += '</table>\n</details>\n' ;
358
353
} else {
359
- result += `${ added . description } ${ deprecated . description } ` +
360
- `${ removed . description } \n` ;
354
+ result += `${ added . description } ${ deprecated . description } ${ removed . description } \n` ;
361
355
}
362
356
363
357
if ( meta . napiVersion ) {
@@ -420,15 +414,14 @@ function buildToc({ filename, apilinks }) {
420
414
const hasStability = node . stability !== undefined ;
421
415
toc += ' ' . repeat ( ( depth - 1 ) * 2 ) +
422
416
( hasStability ? `* <span class="stability_${ node . stability } ">` : '* ' ) +
423
- `<a href="#${ isDeprecationHeading ? node . data . hProperties . id : id } ">` +
424
- `${ headingText } </a>${ hasStability ? '</span>' : '' } \n` ;
417
+ `<a href="#${ isDeprecationHeading ? node . data . hProperties . id : id } ">${ headingText } </a>${ hasStability ? '</span>' : '' } \n` ;
425
418
426
419
let anchor =
427
420
`<span><a class="mark" href="#${ id } " id="${ id } ">#</a></span>` ;
428
421
429
422
if ( realFilename === 'errors' && headingText . startsWith ( 'ERR_' ) ) {
430
- anchor += `<span><a class="mark" href="# ${ headingText } " ` +
431
- ` id="${ headingText } ">#</a></span>`;
423
+ anchor +=
424
+ `<span><a class="mark" href="# ${ headingText } " id="${ headingText } ">#</a></span>`;
432
425
}
433
426
434
427
const api = headingText . replace ( / ^ .* : \s + / , '' ) . replace ( / \( .* / , '' ) ;
@@ -478,8 +471,7 @@ function altDocs(filename, docCreated, versions) {
478
471
`${ host } /docs/latest-v${ versionNum } /api/${ filename } .html` ;
479
472
480
473
const wrapInListItem = ( version ) =>
481
- `<li><a href="${ getHref ( version . num ) } ">${ version . num } ` +
482
- `${ version . lts ? ' <b>LTS</b>' : '' } </a></li>` ;
474
+ `<li><a href="${ getHref ( version . num ) } ">${ version . num } ${ version . lts ? ' <b>LTS</b>' : '' } </a></li>` ;
483
475
484
476
function isDocInVersion ( version ) {
485
477
const [ versionMajor , versionMinor ] = version . num . split ( '.' ) . map ( Number ) ;
0 commit comments