Title: [122338] trunk/Websites/bugs.webkit.org
Revision
122338
Author
[email protected]
Date
2012-07-11 09:56:18 -0700 (Wed, 11 Jul 2012)

Log Message

Deleting content at the top of prettypatch emails destroys HTML formatting
https://bugs.webkit.org/show_bug.cgi?id=90700
<rdar://problem/7488232>

Patch by Alice Cheng <[email protected]> on 2012-07-11
Reviewed by David Kilzer.

* PrettyPatch/PrettyPatch.rb:

Modified Paths

Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (122337 => 122338)


--- trunk/Websites/bugs.webkit.org/ChangeLog	2012-07-11 16:50:44 UTC (rev 122337)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2012-07-11 16:56:18 UTC (rev 122338)
@@ -1,3 +1,13 @@
+2012-07-11  Alice Cheng  <[email protected]>
+
+        Deleting content at the top of prettypatch emails destroys HTML formatting
+        https://bugs.webkit.org/show_bug.cgi?id=90700
+        <rdar://problem/7488232>
+
+        Reviewed by David Kilzer.
+
+        * PrettyPatch/PrettyPatch.rb:
+
 2012-07-10  Adam Barth  <[email protected]>
 
         bugs.webkit.org has mixed content

Modified: trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb (122337 => 122338)


--- trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2012-07-11 16:50:44 UTC (rev 122337)
+++ trunk/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb	2012-07-11 16:56:18 UTC (rev 122338)
@@ -16,7 +16,7 @@
         $last_prettify_file_count = -1
         $last_prettify_part_count = { "remove" => 0, "add" => 0, "shared" => 0, "binary" => 0, "extract-error" => 0 }
         string = normalize_line_ending(string)
-        str = HEADER + "\n"
+        str = "#{HEADER}<body>\n"
 
         # Just look at the first line to see if it is an SVN revision number as added
         # by webkit-patch for git checkouts.
@@ -24,7 +24,7 @@
         string.each_line do |line|
             match = /^Subversion\ Revision: (\d*)$/.match(line)
             unless match.nil?
-                str += "<span class='revision'>" + match[1] + "</span>\n"
+                str << "<span class='revision'>#{match[1]}</span>\n"
                 $svn_revision = match[1].to_i;
             end
             break
@@ -33,7 +33,8 @@
         fileDiffs = FileDiff.parse(string)
 
         $last_prettify_file_count = fileDiffs.length
-        str += fileDiffs.collect{ |diff| diff.to_html }.join
+        str << fileDiffs.collect{ |diff| diff.to_html }.join
+        str << "</body></html>"
     end
 
     def self.filename_from_diff_header(line)
@@ -128,6 +129,8 @@
 
 
     HEADER =<<EOF
+<html>
+<head>
 <style>
 :link, :visited {
     text-decoration: none;
@@ -483,6 +486,7 @@
 </style>
 <script src="" 
 <script src=""
+</head>
 EOF
 
     def self.revisionOrDescription(string)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to