Skip to content

Commit 45c9bd9

Browse files
committed
Alphabetize small list and surround in proper double quotes
1 parent 77b3a5b commit 45c9bd9

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/wp-includes/class-wp-token-set.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,18 @@ public function precomputed_php_source_table( $indent = "\t" ) {
198198
$output .= $data_line;
199199
}
200200

201-
$output .= "{$i1}),\n";
202-
$small_text = str_replace( "\x00", '\x00', $this->small_words );
203-
$output .= "{$i1}'{$small_text}'\n";
201+
$output .= "{$i1}),\n";
202+
203+
$small_words = array();
204+
$at = 0;
205+
while ( $at < strlen( $this->small_words ) ) {
206+
$small_words[] = substr( $this->small_words, $at, $this->key_length );
207+
$at += $this->key_length;
208+
}
209+
sort( $small_words );
210+
211+
$small_text = str_replace( "\x00", '\x00', implode( '', $small_words ) );
212+
$output .= "{$i1}\"{$small_text}\"\n";
204213
$output .= ");\n";
205214

206215
return $output;

src/wp-includes/html-api/html4wp-named-character-entities.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,5 +378,5 @@
378378
// &zwnj &zwj
379379
'zw' => "\x02nj\x01j",
380380
),
381-
'MuNuPiXigegtleltmuneninuorpixi'
381+
"MuNuPiXigegtleltmuneninuorpixi"
382382
);

0 commit comments

Comments
 (0)