Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Commit

Permalink
fixes #13 : comment on line widget is kept
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Ribeiro committed Mar 25, 2013
1 parent e35ccaa commit 3b8b789
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pkg/github.com.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2160,7 +2160,13 @@ window['_pr_isIE6'] = function () {
// Chain // Chain
return this; return this;
} }
})(jQuery); $(".diff-line").each(function() {var text = $.trim($(this).text()); $(this).html("<pre></pre>"); $(this).find("pre").text(text); }) })(jQuery); $(".diff-line").each(function() {
var t = $(this);
var text = $.trim(t.text());
t.contents().filter(function() { return this.nodeType == Node.TEXT_NODE; }).remove()
t.append("<pre></pre>");
t.find("pre").text(text);
})
$(".diff-line pre").addClass("highlight"); $(".diff-line pre").addClass("highlight");
$("td.gd.diff-line pre").css({backgroundColor: "#FDD"}); $("td.gd.diff-line pre").css({backgroundColor: "#FDD"});
$("td.gi.diff-line pre").css({backgroundColor: "#DFD"}); $("td.gi.diff-line pre").css({backgroundColor: "#DFD"});
Expand Down
8 changes: 7 additions & 1 deletion src/footer.js
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,10 @@
$(".diff-line").each(function() {var text = $.trim($(this).text()); $(this).html("<pre></pre>"); $(this).find("pre").text(text); }) $(".diff-line").each(function() {
var t = $(this);
var text = $.trim(t.text());
t.contents().filter(function() { return this.nodeType == Node.TEXT_NODE; }).remove()
t.append("<pre></pre>");
t.find("pre").text(text);
})
$(".diff-line pre").addClass("highlight"); $(".diff-line pre").addClass("highlight");
$("td.gd.diff-line pre").css({backgroundColor: "#FDD"}); $("td.gd.diff-line pre").css({backgroundColor: "#FDD"});
$("td.gi.diff-line pre").css({backgroundColor: "#DFD"}); $("td.gi.diff-line pre").css({backgroundColor: "#DFD"});
Expand Down

0 comments on commit 3b8b789

Please sign in to comment.