File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -177,19 +177,20 @@ protected function formatLines($lines)
177
177
$ lines = array_map (array ($ this , 'ExpandTabs ' ), $ lines );
178
178
$ lines = array_map (array ($ this , 'HtmlSafe ' ), $ lines );
179
179
foreach ($ lines as &$ line ) {
180
- $ line = preg_replace ('# ( +)|^ #e ' , "\ $this-> fixSpaces(' \\ 1') " , $ line );
180
+ $ line = preg_replace_callback ('# ( +)|^ # ' , array ( $ this , ' fixSpaces ' ) , $ line );
181
181
}
182
182
return $ lines ;
183
183
}
184
184
185
185
/**
186
186
* Replace a string containing spaces with a HTML representation using .
187
187
*
188
- * @param string $spaces The string of spaces .
188
+ * @param string[] $matches Array with preg matches .
189
189
* @return string The HTML representation of the string.
190
190
*/
191
- function fixSpaces ($ spaces = '' )
191
+ private function fixSpaces (array $ matches )
192
192
{
193
+ $ spaces = $ matches [1 ];
193
194
$ count = strlen ($ spaces );
194
195
if ($ count == 0 ) {
195
196
return '' ;
You can’t perform that action at this time.
0 commit comments