Allow side by side diff lines to wrap so the view doesn't get really wide with long lines
Allow side by side diff lines to wrap so the view doesn't get really wide with long lines

--- a/css/gitphp.css
+++ b/css/gitphp.css
@@ -124,6 +124,7 @@
 table.diffTable {
 	border-spacing:0px;
 	width: 100%;
+	white-space: pre-wrap;
 }
 
 table.diffTable td {

--- a/templates/sidebyside.tpl
+++ b/templates/sidebyside.tpl
@@ -24,7 +24,7 @@
      {t}blob{/t}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$blobparent->GetHash()}&amp;hb={$commit->GetHash()}&amp;f={$file}">{if $file}a/{$file}{else}{$blobparent->GetHash()}{/if}</a> -&gt; {t}blob{/t}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$blob->GetHash()}&amp;hb={$commit->GetHash()}&amp;f={$file}">{if $file}b/{$file}{else}{$blob->GetHash()}{/if}</a>
    </div>
    {* Display the sidebysidediff *}
-   <table class="diffTable pre">
+   <table class="diffTable">
    {foreach from=$filediff->GetDiffSplit() item=lineinfo}
      {if $lineinfo[0]=='added'}
      <tr class="diff-added">

comments