@@ -32,7 +32,7 @@ const marked = require('marked');
32
32
// customized heading without id attribute
33
33
const renderer = new marked . Renderer ( ) ;
34
34
renderer . heading = function ( text , level ) {
35
- return '<h' + level + '>' + text + ' </h' + level + ' >\n' ;
35
+ return `<h ${ level } > ${ text } </h${ level } >\n` ;
36
36
} ;
37
37
marked . setOptions ( {
38
38
renderer : renderer
@@ -246,25 +246,25 @@ function processList(section) {
246
246
} else if ( type === 'list_item_end' ) {
247
247
if ( ! current ) {
248
248
throw new Error ( 'invalid list - end without current item\n' +
249
- JSON . stringify ( tok ) + '\n' +
249
+ ` ${ JSON . stringify ( tok ) } \n` +
250
250
JSON . stringify ( list ) ) ;
251
251
}
252
252
current = stack . pop ( ) ;
253
253
} else if ( type === 'text' ) {
254
254
if ( ! current ) {
255
255
throw new Error ( 'invalid list - text without current item\n' +
256
- JSON . stringify ( tok ) + '\n' +
256
+ ` ${ JSON . stringify ( tok ) } \n` +
257
257
JSON . stringify ( list ) ) ;
258
258
}
259
259
current . textRaw = current . textRaw || '' ;
260
- current . textRaw += tok . text + ' ' ;
260
+ current . textRaw += ` ${ tok . text } ` ;
261
261
}
262
262
} ) ;
263
263
264
264
// shove the name in there for properties, since they are always
265
265
// just going to be the value etc.
266
266
if ( section . type === 'property' && values [ 0 ] ) {
267
- values [ 0 ] . textRaw = '`' + section . name + '` ' + values [ 0 ] . textRaw ;
267
+ values [ 0 ] . textRaw = `\` ${ section . name } \` ${ values [ 0 ] . textRaw } ` ;
268
268
}
269
269
270
270
// now pull the actual values out of the text bits.
@@ -362,8 +362,8 @@ function parseSignature(text, sig) {
362
362
// at this point, the name should match.
363
363
if ( p !== param . name ) {
364
364
console . error ( 'Warning: invalid param "%s"' , p ) ;
365
- console . error ( ' > ' + JSON . stringify ( param ) ) ;
366
- console . error ( ' > ' + text ) ;
365
+ console . error ( ` > ${ JSON . stringify ( param ) } ` ) ;
366
+ console . error ( ` > ${ text } ` ) ;
367
367
}
368
368
if ( optional ) param . optional = true ;
369
369
if ( def !== undefined ) param . default = def ;
@@ -428,7 +428,7 @@ function parseListItem(item) {
428
428
function finishSection ( section , parent ) {
429
429
if ( ! section || ! parent ) {
430
430
throw new Error ( 'Invalid finishSection call\n' +
431
- JSON . stringify ( section ) + '\n' +
431
+ ` ${ JSON . stringify ( section ) } \n` +
432
432
JSON . stringify ( parent ) ) ;
433
433
}
434
434
@@ -488,11 +488,11 @@ function finishSection(section, parent) {
488
488
489
489
var plur ;
490
490
if ( section . type . slice ( - 1 ) === 's' ) {
491
- plur = section . type + 'es' ;
491
+ plur = ` ${ section . type } es` ;
492
492
} else if ( section . type . slice ( - 1 ) === 'y' ) {
493
493
plur = section . type . replace ( / y $ / , 'ies' ) ;
494
494
} else {
495
- plur = section . type + 's' ;
495
+ plur = ` ${ section . type } s` ;
496
496
}
497
497
498
498
// if the parent's type is 'misc', then it's just a random
0 commit comments