Robert Yang <liezhi.yang-cwa4wttnnzf54taoqty...@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
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to