diff --git a/js/common/documentationToHTML.js b/js/common/documentationToHTML.js index d503add1f..be4a9653e 100644 --- a/js/common/documentationToHTML.js +++ b/js/common/documentationToHTML.js @@ -43,12 +43,14 @@ const lines = string.split( '\n' ); let inParagraph = false; + function insideParagraph() { if ( !inParagraph ) { result += '

\n'; inParagraph = true; } } + function outsideParagraph() { if ( inParagraph ) { result += '

\n'; @@ -164,7 +166,7 @@ if ( parameter.optional ) { name = '' + name + ''; } - result += '' + typeString( parameter.type ) + '' + name + ' - ' + description + '\n'; + result += '' + typeString( parameter.type ) + '' + name + ' - ' + description + '\n'; } ); result += '\n'; } diff --git a/js/common/extractDocumentation.js b/js/common/extractDocumentation.js index c93c78cb7..cbe9b0969 100644 --- a/js/common/extractDocumentation.js +++ b/js/common/extractDocumentation.js @@ -90,7 +90,7 @@ typeString = typeString.slice( 1, typeString.length - 1 ); // for ( var i = 0; i < line.length; i++ ) { - // TODO: handle |, {}, etc. https://github.com/phetsims/chipper/issues/411 + // TODO: handle |, {}, etc. https://github.com/phetsims/chipper/issues/411 // } return typeString; @@ -335,9 +335,11 @@ function blockCommentFilter( comment ) { return comment.type === 'Block' && comment.value.charAt( 0 ) === '*'; } + function lineCommentFilter( comment ) { return comment.type === 'Line' && comment.value.indexOf( '@public' ) >= 0; } + let lineComments = []; if ( node.leadingComments ) { const blockComments = node.leadingComments.filter( blockCommentFilter ); diff --git a/js/grunt/generateThumbnails.js b/js/grunt/generateThumbnails.js index 655552266..40a85ea66 100644 --- a/js/grunt/generateThumbnails.js +++ b/js/grunt/generateThumbnails.js @@ -24,7 +24,7 @@ const jimp = require( 'jimp' ); * @param {string} altSuffix - ending for the filename e.g. -alt1 * @returns {Promise} - Resolves to a {Buffer} with the image data */ -module.exports = function ( repo, width, height, quality, mime, altSuffix ) { +module.exports = function( repo, width, height, quality, mime, altSuffix ) { return new Promise( ( resolve, reject ) => { const fullResImageName = `../${repo}/assets/${repo}-screenshot${altSuffix || ''}.png`; @@ -33,11 +33,11 @@ module.exports = function ( repo, width, height, quality, mime, altSuffix ) { return; } - new jimp( fullResImageName, function () { //eslint-disable-line no-new + new jimp( fullResImageName, function() { //eslint-disable-line no-new if ( mime === jimp.MIME_JPEG ) { this.quality( quality ); } - this.resize( width, height ).getBuffer( mime, function ( error, buffer ) { + this.resize( width, height ).getBuffer( mime, function( error, buffer ) { if ( error ) { reject( new Error( error ) ); } diff --git a/js/load-unbuilt-strings.js b/js/load-unbuilt-strings.js index 7742d1aea..2349c82bb 100644 --- a/js/load-unbuilt-strings.js +++ b/js/load-unbuilt-strings.js @@ -81,7 +81,7 @@ try { json = JSON.parse( request.responseText ); } - catch ( e ) { + catch( e ) { console.log( `Could not parse string file for ${repo} with locale ${locale}, perhaps that translation does not exist yet?` ); } if ( json ) {