Revision ac9bfb42
Von Moritz Bunkus vor etwa 13 Jahren hinzugefügt
SL/Template/Simple.pm | ||
---|---|---|
125 | 125 |
|
126 | 126 |
while ($text =~ /$self->{substitute_vars_re}/) { |
127 | 127 |
my ($tag_pos, $tag_len) = ($-[0], $+[0] - $-[0]); |
128 |
my ($var, @options) = split(/\s+/, $1); |
|
128 |
my ($var, @option_list) = split(/\s+/, $1); |
|
129 |
my %options = map { ($_ => 1) } @option_list; |
|
129 | 130 |
|
130 | 131 |
my $value = $self->_get_loop_variable($var, 0, @indices); |
131 |
$value = $self->format_string($value) unless (grep(/^NOESCAPE$/, @options)); |
|
132 |
$value = $form->parse_amount({ numberformat => $::myconfig{output_numberformat} || $::myconfig{numberformat} }, $value) if $options{NOFORMAT}; |
|
133 |
$value = $self->format_string($value) unless $options{NOESCAPE}; |
|
132 | 134 |
|
133 | 135 |
substr($text, $tag_pos, $tag_len, $value); |
134 | 136 |
} |
Auch abrufbar als: Unified diff
Variablen in Druckvorlagen optional unformatiert ausgeben lassen