Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove indenting within compiled templates
If a template contains a multiline string, within for example a call to a Locale::gettext template function for translation, then the compiled version of the string written to the compiled template file will contain extra indent whitespace due to the regular expressions within the as_perl() function. For example, the template fragment: [% loc("This is a multiline string.") %] will be written to the compiled file as something like $output .= $stash->get(['loc', [ 'This is a multiline string.' ]]); This means that - once a compiled template is loaded in, after say a server restart - the translation stops working because the original string does not exactly match the translation string. The indentation appears to be optional, and is only within compiled template files, so this commit simply removes it.
- Loading branch information