mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
- improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
https://github.com/smarty-php/smarty/pull/181
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
===== 3.1.30-dev ===== (xx.xx.xx)
|
||||
11.02.2016
|
||||
- improvement added KnockoutJS comments to trimwhitespace outputfilter https://github.com/smarty-php/smarty/issues/82
|
||||
https://github.com/smarty-php/smarty/pull/181
|
||||
|
||||
10.02.2016
|
||||
- bugfix {strip} must keep space on output creating smarty tags within html tags https://github.com/smarty-php/smarty/issues/177
|
||||
- bugfix wrong precedence on special if conditions like '$foo is ... by $bar' could cause wrong code https://github.com/smarty-php/smarty/issues/178
|
||||
|
@@ -26,8 +26,8 @@ function smarty_outputfilter_trimwhitespace($source)
|
||||
// Unify Line-Breaks to \n
|
||||
$source = preg_replace("/\015\012|\015|\012/", "\n", $source);
|
||||
|
||||
// capture Internet Explorer Conditional Comments
|
||||
if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches,
|
||||
// capture Internet Explorer and KnockoutJS Conditional Comments
|
||||
if (preg_match_all('#<!--((\[[^\]]+\]>.*?<!\[[^\]]+\])|(\s*/?ko\s+.+))-->#is', $source, $matches,
|
||||
PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
|
||||
foreach ($matches as $match) {
|
||||
$store[] = $match[ 0 ][ 0 ];
|
||||
|
Reference in New Issue
Block a user