Emoji: Tweak the generated emoji arrays to not cause coding standards errors.

Props netweb, jrf.
Fixes #43150.



git-svn-id: https://develop.svn.wordpress.org/trunk@42610 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2018-01-25 01:05:01 +00:00
parent 5bc3564249
commit afb4f45e62
2 changed files with 6 additions and 6 deletions

View File

@ -664,7 +664,7 @@ module.exports = function(grunt) {
// Convert the entities list to PHP array syntax
entities = '\'' + emojiArray.filter( function( val ) {
return val.length >= 8 ? val : false ;
} ).join( '\',\'' ) + '\'';
} ).join( '\', \'' ) + '\'';
// Create a list of all characters used by the emoji list
partials = partials.replace( /-/g, '\n' );
@ -675,11 +675,11 @@ module.exports = function(grunt) {
// Convert the partials list to PHP array syntax
partials = '\'' + Array.from( partialsSet ).filter( function( val ) {
return val.length >= 8 ? val : false ;
} ).join( '\',\'' ) + '\'';
} ).join( '\', \'' ) + '\'';
regex = '// START: emoji arrays\n';
regex += '\t$entities = array(' + entities + ');\n';
regex += '\t$partials = array(' + partials + ');\n';
regex += '\t$entities = array( ' + entities + ' );\n';
regex += '\t$partials = array( ' + partials + ' );\n';
regex += '\t// END: emoji arrays';
return regex;

File diff suppressed because one or more lines are too long