Skip to content

Commit

Permalink
Update: remove spaces between html tags
Browse files Browse the repository at this point in the history
  • Loading branch information
satrun77 authored Dec 12, 2018
1 parent 03429fb commit 8b00ace
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Template/Parser/Spaceless.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ public static function spaceless($res)
'/\'(\s+)([^\s\'])/m',
'/\'(\s+)\'/m',
'/([^\s\'])(\s+)\';/m',
'/>\s+</',
];

// Template string code to remove whitespaces from
$php = $res['Template']['php'];

// Remove whitespaces
$php = preg_replace($pattern, ["'$2", "''", "$1';"], $php);
$php = preg_replace($pattern, ["'$2", "''", "$1';", '><'], $php);

return $php;
}
Expand Down

0 comments on commit 8b00ace

Please sign in to comment.