diff --git a/NEWS b/NEWS index 478ca0b0..fe38e336 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ + - 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 9eea3261..09b0d410 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 = "\n"; + $plugins_code = ""; $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 .= "\n"; + $template_header .= ""; $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 ); ?>\n"; + return "assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>"; } else { - return "\n"; + return ""; } } @@ -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 "\n"; + return ""; 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 '\n"; + return '"; } /** @@ -770,7 +770,7 @@ class Smarty_Compiler extends Smarty { $output = ''; } - return '\n"; + return '"; } /** @@ -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 "\n"; + return ""; } /** @@ -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 "\n"; + return ""; }