From 03922f14bbfd3e3c3ba00077946322d859d38beb Mon Sep 17 00:00:00 2001 From: messju Date: Wed, 11 Jun 2003 15:29:14 +0000 Subject: [PATCH] backed out newlines patch --- NEWS | 1 - libs/Smarty_Compiler.class.php | 18 +++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index fe38e336..478ca0b0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,3 @@ - - removed newlines in compiled templates after closing tags (messju) - added block-methods for registered objects (Bharat Mediratta, messju) - ignore one char resource names like c:foo.tpl (Monte) - added default_resource_type feature (Monte) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 09b0d410..9eea3261 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -348,14 +348,14 @@ class Smarty_Compiler extends Smarty { } $_plugins_params .= '))'; $_plugin_filepath = $this->_get_plugin_filepath('core', 'load_plugins'); - $plugins_code = ""; + $plugins_code = "\n"; $template_header .= $plugins_code; $this->_plugin_info = array(); } if ($this->_init_smarty_vars) { $_plugin_filepath = $this->_get_plugin_filepath('core', 'assign_smarty_interface'); - $template_header .= ""; + $template_header .= "\n"; $this->_init_smarty_vars = false; } @@ -394,9 +394,9 @@ class Smarty_Compiler extends Smarty { if (preg_match('!^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$!', $tag_command)) { $_return = $this->_parse_var_props($tag_command . $tag_modifier, $this->_parse_attrs($tag_args)); if(isset($_tag_attrs['assign'])) { - return "assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>"; + return "assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>\n"; } else { - return ""; + return "\n"; } } @@ -468,7 +468,7 @@ class Smarty_Compiler extends Smarty { case 'literal': list (,$literal_block) = each($this->_literal_blocks); $this->_current_line_no += substr_count($literal_block, "\n"); - return ""; + return "\n"; case 'php': if ($this->security && !$this->security_settings['PHP_TAGS']) { @@ -678,7 +678,7 @@ class Smarty_Compiler extends Smarty { $this->_parse_modifiers($return, $tag_modifier); } - return '"; + return '\n"; } /** @@ -770,7 +770,7 @@ class Smarty_Compiler extends Smarty { $output = ''; } - return '"; + return '\n"; } /** @@ -805,7 +805,7 @@ class Smarty_Compiler extends Smarty { $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))"; $_plugin_filepath = $this->_get_plugin_filepath('core', 'run_insert_handler'); - return ""; + return "\n"; } /** @@ -891,7 +891,7 @@ class Smarty_Compiler extends Smarty { $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', (array)$arg_list)."))"; $_plugin_filepath = $this->_get_plugin_filepath('core', 'smarty_include_php'); - return ""; + return "\n"; }