WebSVN + Python + Whitespace.

If you use websvn with a python project, you will know that whitespace is ignored on the diff viewer (comp.php). This makes python nearly unreadable, as you don’t know where code blocks begin/end. This is a simple item to fix however. Using CSS, you can cause the whitespace to be treated as pre-formatted text and thus displayed correctly.

Let’s assume you are using the calm template (default).

# vi templates/calm/styles.css
table.diff {
  border:1px solid #f1f1f1;
  padding:0 2px 2px 2px;
  margin:0 1px;
  white-space: pre;

Add the last line (white-space: pre;)

About this entry