Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
To: openembedded-core@lists.openembedded.org
Cc: Robert Yang <liezhi.yang-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
Subject: Re: [PATCH 2/3] package_ipk.bbclass: make DESCRIPTION support newline
Date: Wed, 19 Jun 2013 12:33:19 +0200	[thread overview]
Message-ID: <lyy5a675lc.fsf@ensc-virt.intern.sigma-chemnitz.de> (raw)
In-Reply-To: <5bc169404eddb0ec90ce82c6013432f295d0cdc3.1371621343.git.liezhi.yang@windriver.com> (Robert Yang's message of "Wed, 19 Jun 2013 05:00:40 -0400")

Robert Yang <liezhi.yang-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
writes:

> The recipe's DESCRIPTION is wrapped automatically by textwrap, make it
> support newline ("\n") to let the user can wrap it manually, e.g.:
>
> -                    ctrlfile.write('Description: %s\n' % summary)
> -                    ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))
> +                    for t in description.split('\\n'):
> +                        ctrlfile.write('%s\n' % textwrap.fill(t, width=74, initial_indent=' ', subsequent_indent=' '))

When user wrapped lines manually, why is textwrap.fill() called on the
lines again?  E.g. when user wrapped manually at 78 columns, this will
create long - short - long - short lines (in german, why call this
effect "Kammquoting" (comb quoting)) .

I suggest to avoid textwrap.fill() when text contains '\n'.



Enrico


  parent reply	other threads:[~2013-06-19 10:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:00 [PATCH 0/3] make DESCRIPTION support newline Robert Yang
2013-06-19  9:00 ` [PATCH 1/3] package_rpm.bbclass: " Robert Yang
2013-06-19  9:00 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang
2013-06-19  9:29   ` Martin Jansa
2013-06-19  9:49     ` Richard Purdie
2013-06-19 10:10     ` Phil Blundell
2013-06-19 10:33   ` Enrico Scholz [this message]
2013-06-28  3:21     ` Robert Yang
2013-06-19  9:00 ` [PATCH 3/3] package_deb.bbclass: " Robert Yang
2013-06-26  3:27 ` [PATCH 0/3] " Robert Yang
2013-06-26 16:05   ` Saul Wold
2013-06-28  2:04     ` Robert Yang
2013-06-28  6:50       ` Martin Jansa
2013-06-28  7:34         ` Robert Yang
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08  3:17 [PATCH 0/3 V2] " Robert Yang
2013-07-08  3:17 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lyy5a675lc.fsf@ensc-virt.intern.sigma-chemnitz.de \
    --to=enrico.scholz@sigma-chemnitz.de \
    --cc=liezhi.yang-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox