Skip to content

Commit

Permalink
- improvement added KnockoutJS comments to trimwhitespace outputfilter
Browse files Browse the repository at this point in the history
  • Loading branch information
uwetews committed Feb 11, 2016
1 parent 00f0769 commit 3756588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions libs/plugins/outputfilter.trimwhitespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand Down

0 comments on commit 3756588

Please sign in to comment.