DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (3865bf230c49)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# add mathml.css to the ua.css

$sep = '/'; # directory separator

$ua = $ARGV[0]; $ua =~ s|\\|$sep|g;

open(UA, $ua) || die "Cannot find ua.css\n";
$css = join("", <UA>);
close(UA);

if (!($css =~ m|\@import.*mathml\.css|)) 
{
  # 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://gre-resources/mathml\.css\);$2$3#;
  open(UA, ">$ua");
  print UA $css;
  close(UA);
}