[OE-core] [PATCH 2/3] package_ipk.bbclass: make DESCRIPTION support newline
Enrico Scholz
enrico.scholz at sigma-chemnitz.de
Wed Jun 19 10:33:19 UTC 2013
Robert Yang <liezhi.yang-CWA4WttNNZF54TAoqtyWWQ at 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
More information about the Openembedded-core
mailing list