From: Michael Hanke Date: Thu, 27 Aug 2009 01:35:50 +0000 (-0400) Subject: Acknowledge paragraphs in long descriptions. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=56425673fd424f2fd063f72ae02b5ab35b621b0f;p=neurodebian.git Acknowledge paragraphs in long descriptions. --- diff --git a/neurodebian/dde.py b/neurodebian/dde.py index 0ebb0ee..826710f 100644 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -441,10 +441,13 @@ def generate_pkgpage(pkg, cfg, db, template, addenum_dir): title = '%s\n %s\n%s' % (underline, title, underline) # preprocess long description - print 'rendering', pkg ld = db['main']['long_description'] - print 'AAAAA', repr(ld), type(ld) - ld = u' '.join([l.lstrip(' .') for l in ld.split('\n')]) + ld = ld.split('\n') + for i, l in enumerate(ld): + if l == ' .': + ld[i] = '#NEWLINEMARKER#' + ld = u' '.join([l.lstrip() for l in ld]) + ld = ld.replace('#NEWLINEMARKER# ', '\n\n') page = template.render(pkg=pkg, title=title,