id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc
240	Block and / or folded literal dumps fail on trailing space	yarkot1@…	xi	"Goal:
Yaml output of both block and folded styles, such as:
folded_example: >
  I have some text here
  and then some more here.
literal_style: |
  I have some text here
  and some more here.

Approach:
Searching, I found this http://stackoverflow.com/questions/6432605  approach, which seems to work reasonably well _except_ for a peculiar data situation (""the BUG"").

PROBLEM:
If the source python dict looks like this:

>>> d = { 'x': literal_unicode('I have some text here\n and some more here.\n') }
>>> print(yaml.dump(d))
x: |
  I have some text here
   and some more here.

If the source has any trailing whitespace before the newlines (tab or spaces tested), then the output changes to this:

>>> d = { 'x': literal_unicode('I have some text here\n and some more here.\t\n') }
>>> print(yaml.dump(d))
x: ""I have some text here\n and some more here.\t\n""

Likewise for folded representation:
>>> d = { 'x': folded_unicode('I have some text here\n and some more here.\t\n') }
>>> print(yaml.dump(d))
x: ""I have some text here\n and some more here.\t\n""

>>> d = { 'x': folded_unicode('I have some text here\n and some more here.\n') }
>>> print(yaml.dump(d))
x: >
  I have some text here
   and some more here.

----
OS/X Snow Leopard;
Python Version 2.7.3
pyYaml '3.10'
"	defect	new	normal	pyyaml	normal			
