From 742694f8147435413dc6e619d804eb73d6628564 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Fri, 8 Feb 2002 03:34:57 +0000 Subject: [PATCH] since bad end of lines cause troubles on some platforms, extend the little perl magic for dos2unix to dos2{unix or mac} so that the conditional addition of mathml.css to the ua.css works reliably everywhere --- layout/mathml/content/src/mathml-css.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/mathml/content/src/mathml-css.pl b/layout/mathml/content/src/mathml-css.pl index 13a464e44a3..38e7a79966b 100644 --- a/layout/mathml/content/src/mathml-css.pl +++ b/layout/mathml/content/src/mathml-css.pl @@ -10,8 +10,9 @@ close(UA); if (!($css =~ m|\@import.*mathml\.css|)) { - $css =~ s/\cM\n/\n/g; # dos2unix end of line - $css =~ s|(\@import[^\@]+\;)\n\n|$1\n\@import url\(resource:/res/mathml\.css\);\n\n|; + # since bad end of lines cause troubles on some platforms + # do a little perl magic for dos2{unix or mac} here + $css =~ s#(\@import[^\@]+\;)(\cM?)(\n\cM?\n)#$1$2\n\@import url\(resource:/res/mathml\.css\);$2$3#; open(UA, ">$ua"); print UA $css; close(UA);