From 425bf94d77af5a71327f641d29a9600775aa327b Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Tue, 9 Jan 2007 17:38:35 +0100 Subject: [PATCH] gitweb: Mark closing 's in output Add HTML comments () to output, to mark which 'div' element the closing corresponds to. Signed-off-by: Jakub Narebski --- gitweb/gitweb.perl | 55 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 1a2d94e760..7b6cb4c3ed 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1804,10 +1804,10 @@ EOF $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) . " search:\n", $cgi->textfield(-name => "s", -value => $searchtext) . "\n" . - "" . # class="search" + "\n" . # class="search" $cgi->end_form() . "\n"; } - print "\n"; # class="page_header" + print "\n"; # class="page_header" } sub git_footer_html { @@ -1827,7 +1827,7 @@ sub git_footer_html { print $cgi->a({-href => href(project=>undef, action=>"project_index"), -class => "rss_logo"}, "TXT") . "\n"; } - print "\n" ; # class="page_footer" + print "\n" ; # class="page_footer" if (-f $site_footer) { open (my $fd, $site_footer); @@ -1849,7 +1849,7 @@ sub die_error {

$status - $error
- + EOF git_footer_html(); exit; @@ -1887,7 +1887,7 @@ sub git_print_page_nav { $_ : $cgi->a({-href => href(%{$arg{$_}})}, "$_") } @navs); print "
\n$extra
\n" . - "\n"; # class="page_nav" + "\n"; # class="page_nav" } sub format_paging_nav { @@ -1934,7 +1934,7 @@ sub git_print_header_div { print "
\n" . $cgi->a({-href => href(%args), -class => "title"}, $title ? $title : $action) . - "\n
\n"; # class="header" + "\n\n"; # class="header" } #sub git_print_authorship (\%) { @@ -1990,7 +1990,7 @@ sub git_print_page_path { print esc_path($basename); } } - print "
\n"; # class="page_path" + print "
\n"; # class="page_path" } # sub git_print_log (\@;%) { @@ -2188,7 +2188,7 @@ sub git_difftree_body { if ($#{$difftree} > 10) { print(($#{$difftree} + 1) . " files changed:\n"); } - print "\n"; # class="list_head" + print "\n"; # class="list_head" print "\n"; my $alternate = 1; @@ -2518,7 +2518,8 @@ sub git_patchset_body { } print $patch_line . "
\n"; } - print "\n" if (@diff_header > 0); # class="diff extended_header" + print "\n" + if (@diff_header > 0); # class="diff extended_header" # from-file/to-file diff header $patch_line = $last_patch_line; @@ -2555,10 +2556,10 @@ sub git_patchset_body { } } continue { - print "\n"; # class="patch" + print "\n"; # class="patch" } - print "\n"; # class="patchset" + print "\n"; # class="patchset" } # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -2971,7 +2972,7 @@ sub git_project_list { open (my $fd, $home_text); print <$fd>; close $fd; - print "\n"; # class="index_include" + print "\n"; # class="index_include" } git_project_list_body(\@list, $order); git_footer_html(); @@ -3123,14 +3124,14 @@ sub git_tag { "\n"; } print "
\n\n" . - "\n"; # class="title_text" + "\n"; # class="title_text" print "
"; my $comment = $tag{'comment'}; foreach my $line (@$comment) { chomp $line; print esc_html($line, -nbsp=>1) . "
\n"; } - print "
\n"; # class="page_body" + print "\n"; # class="page_body" git_footer_html(); } @@ -3236,7 +3237,7 @@ HTML print "\n"; } print "\n"; - print "\n"; # class="page_body" + print "\n"; # class="page_body" close $fd or print "Reading blob failed\n"; git_footer_html(); @@ -3335,7 +3336,7 @@ HTML print "\n\n"; close $fd or print "Reading blob failed.\n"; - print ""; # class="page_body" + print ""; # class="page_body" git_footer_html(); } @@ -3491,7 +3492,7 @@ sub git_blob { } close $fd or print "Reading blob failed.\n"; - print ""; # class="page_body" + print ""; # class="page_body" git_footer_html(); } @@ -3594,7 +3595,7 @@ sub git_tree { print "\n"; } print "\n" . - ""; # class="page_body"; + ""; # class="page_body"; git_footer_html(); } @@ -3671,19 +3672,19 @@ sub git_log { " | " . $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree") . "
\n" . - "\n" . # class="log_link" + "\n" . # class="log_link" "" . esc_html($co{'author_name'}) . " [$ad{'rfc2822'}]
\n" . - "\n"; # class="title_text" + "\n"; # class="title_text" print "
\n"; git_print_log($co{'comment'}, -final_empty_line=> 1); - print "
\n"; # class="log_body" + print "\n"; # class="log_body" } if ($#commitlist >= 100) { print "
\n"; print $cgi->a({-href => href(action=>"log", hash=>$hash, page=>$page+1), -accesskey => "n", -title => "Alt-n"}, "next"); - print "
\n"; # class="page_nav" + print "\n"; # class="page_nav" } git_footer_html(); } @@ -3808,11 +3809,11 @@ sub git_commit { "\n"; } print "". - "\n"; # class="title_text" + "\n"; # class="title_text" print "
\n"; git_print_log($co{'comment'}); - print "
\n"; # class="page_body" + print "\n"; # class="page_body" if (@$parents <= 1) { # do not output difftree/whatchanged for merges @@ -4018,7 +4019,7 @@ sub git_blobdiff { git_patchset_body($fd, [ \%diffinfo ], $hash_base, $hash_parent_base); close $fd; - print "\n"; # class="page_body" + print "\n"; # class="page_body" git_footer_html(); } else { @@ -4140,7 +4141,7 @@ sub git_commitdiff { if (@{$co{'comment'}} > 1) { print "
\n"; git_print_log($co{'comment'}, -final_empty_line=> 1, -remove_title => 1); - print "
\n"; # class="log" + print "\n"; # class="log" } } elsif ($format eq 'plain') { @@ -4175,7 +4176,7 @@ TEXT git_patchset_body($fd, \@difftree, $hash, $hash_parent); close $fd; - print "\n"; # class="page_body" + print "\n"; # class="page_body" git_footer_html(); } elsif ($format eq 'plain') { -- 2.11.4.GIT