From a4c6c83d27a9613e0fec95159988d16cdbe2782d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 17 Jan 2014 14:54:17 +0100 Subject: [PATCH] HTML-zu-LaTeX/OpenDocument:   durch normale Leerzeichen ersetzen --- SL/Template/LaTeX.pm | 2 +- SL/Template/OpenDocument.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Template/LaTeX.pm b/SL/Template/LaTeX.pm index 4bb4ce63d..23e2ed0ae 100644 --- a/SL/Template/LaTeX.pm +++ b/SL/Template/LaTeX.pm @@ -71,7 +71,7 @@ sub _format_html { $content =~ s{ \r+ }{}gx; $content =~ s{ \n+ }{ }gx; - $content =~ s{ \s+ }{ }gx; + $content =~ s{ (?:\ |\s)+ }{ }gx; my @parts = map { if (substr($_, 0, 1) eq '<') { diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index 085fa25db..85184c019 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -73,7 +73,7 @@ sub _format_html { $content =~ s{ ^

|

$ }{}gx; $content =~ s{ \r+ }{}gx; $content =~ s{ \n+ }{ }gx; - $content =~ s{ \s+ }{ }gx; + $content =~ s{ (?:\ |\s)+ }{ }gx; my $in_p = 1; my $p_start_tag = qq||; -- 2.20.1