Revision cbf105b2
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Template/LaTeX.pm | ||
---|---|---|
72 | 72 |
$content =~ s{ \r+ }{}gx; |
73 | 73 |
$content =~ s{ \n+ }{ }gx; |
74 | 74 |
$content =~ s{ (?:\ |\s)+ }{ }gx; |
75 |
$content =~ s{ (?:\ |\s)+$ }{}gx; |
|
76 |
$content =~ s{ (?: <br/?> )+$ }{}gx; |
|
75 | 77 |
|
76 |
my @parts = map { |
|
78 |
my @parts = grep { $_ } map {
|
|
77 | 79 |
if (substr($_, 0, 1) eq '<') { |
78 | 80 |
s{ +}{}g; |
79 | 81 |
$html_replace{$_} || ''; |
... | ... | |
83 | 85 |
} |
84 | 86 |
} split(m{(<.*?>)}x, $content); |
85 | 87 |
|
86 |
return join('', @parts); |
|
88 |
$content = join '', @parts; |
|
89 |
$content =~ s{ (?: [\n\s] | \\newline )+$ }{}gx; |
|
90 |
|
|
91 |
return $content; |
|
87 | 92 |
} |
88 | 93 |
|
89 | 94 |
my %formatters = ( |
Auch abrufbar als: Unified diff
LaTeX-Escaping von HTML: Newlines am Ende entfernen