From e1e63d2a5b312b64d9935c3d92eb8d2e15a5b1b3 Mon Sep 17 00:00:00 2001 From: nbm Date: Sun, 19 Feb 2006 14:03:15 +0000 Subject: [PATCH] Convert multiple newlines and carriage returns in a row to a single space (to work better if the templates are changed to DOS line ending format) --- bin/smarty_to_gettext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/smarty_to_gettext.php b/bin/smarty_to_gettext.php index 82ae282..a14a2f7 100755 --- a/bin/smarty_to_gettext.php +++ b/bin/smarty_to_gettext.php @@ -81,7 +81,7 @@ function do_file($file) $content = $matches[3][$i]; if (!preg_match('/formatmatters\s*=\s*["\']?\s*(.[^\"\']*)\s*["\']?/', $matches[2][$i], $match)) { $replace = array( - '@[\n\r]@' => ' ', + '@[\n\r]+@' => ' ', ); $content = preg_replace(array_keys($replace), array_values($replace), $content); } -- libgit2 0.21.4