зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
65a01be35c
Коммит
742694f814
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче