changeset 13934:ebe1ddbbefd7

paper: preserve whitespace on description instead of adding breaks This preserves the indentation of text in the changeset description. This is useful for example for descriptions containing command line use case examples like: $ hg -q heads 13934:648a834cca14 13912:71ea5b2b9517 Without this patch, such space-char indented text was just left aligned.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 15 Apr 2011 10:56:26 +0200
parents 3d83c7d70a98
children 6e6d19738df9
files mercurial/templates/paper/changeset.tmpl mercurial/templates/static/style-paper.css
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templates/paper/changeset.tmpl	Wed Apr 13 13:06:35 2011 -0500
+++ b/mercurial/templates/paper/changeset.tmpl	Fri Apr 15 10:56:26 2011 +0200
@@ -40,7 +40,7 @@
 files, or words in the commit message</div>
 </form>
 
-<div class="description">{desc|strip|escape|addbreaks|nonempty}</div>
+<div class="description">{desc|strip|escape|nonempty}</div>
 
 <table id="changesetEntry">
 <tr>
--- a/mercurial/templates/static/style-paper.css	Wed Apr 13 13:06:35 2011 -0500
+++ b/mercurial/templates/static/style-paper.css	Fri Apr 15 10:56:26 2011 +0200
@@ -210,6 +210,7 @@
   border-left: 2px solid #999;
   margin: 1em 0 1em 0;
   padding: .3em;
+  white-space: pre;
 }
 
 /* Graph */