From 29185b688ec990bdb801cd8736a12c403095db0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 11 Apr 2013 12:51:40 +0200 Subject: [PATCH] =?utf8?q?config=20tag-style=20f=C3=BCr=20TT=20vorlagen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Template/LaTeX.pm | 4 ++++ SL/Template/Simple.pm | 1 + 2 files changed, 5 insertions(+) diff --git a/SL/Template/LaTeX.pm b/SL/Template/LaTeX.pm index 5d5008c1f..02ad31761 100644 --- a/SL/Template/LaTeX.pm +++ b/SL/Template/LaTeX.pm @@ -356,6 +356,10 @@ sub parse { if ($self->{use_template_toolkit}) { my $additional_params = $::form; + if ($self->{custom_tag_style}) { + $contents = "[% TAGS $self->{tag_start} $self->{tag_end} %]\n" . $contents; + } + $::form->init_template->process(\$contents, $additional_params, \$new_contents) || die $::form->template->error; } else { $new_contents = $self->parse_block($contents); diff --git a/SL/Template/Simple.pm b/SL/Template/Simple.pm index b1f155bf5..be5ba8b5d 100644 --- a/SL/Template/Simple.pm +++ b/SL/Template/Simple.pm @@ -48,6 +48,7 @@ sub set_tag_style { my $tag_start = shift; my $tag_end = shift; + $self->{custom_tag_style} = 1; $self->{tag_start} = $tag_start; $self->{tag_end} = $tag_end; $self->{tag_start_qm} = quotemeta $tag_start; -- 2.20.1