From 5ada8632263f93bfaa78d9136cc815fbeee95ead Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 13 Sep 2007 15:42:35 +0000 Subject: [PATCH] Die Option zum Setzen des Tag-Stils etwas verallgemeinert und dokumentiert. --- SL/Template.pm | 48 ++++++++++++++++++++++- doc/dokumentenvorlagen-und-variablen.html | 39 +++++++++++++++++- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/SL/Template.pm b/SL/Template.pm index 3439f52a3..f6afe692a 100644 --- a/SL/Template.pm +++ b/SL/Template.pm @@ -400,6 +400,52 @@ sub parse_first_line { return 1; } +sub _parse_config_option { + my $self = shift; + my $line = shift; + + $line =~ s/^\s*//; + $line =~ s/\s*$//; + + my ($key, $value) = split m/\s*=\s*/, $line, 2; + + if ($key eq 'tag-style') { + $self->set_tag_style(split(m/\s+/, $value, 2)); + } +} + +sub _parse_config_lines { + my $self = shift; + my $lines = shift; + + my ($comment_start, $comment_end) = ("", ""); + + if (ref $self eq 'LaTeXTemplate') { + $comment_start = '\s*%'; + } elsif (ref $self eq 'HTMLTemplate') { + $comment_start = '\s*