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