if flags:
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
+ if 'wrapping' in options:
+ options['wrapping'] = str(options['wrapping'])
result = document.transform(style, **options)
source = ""
contributors = ""
funders = ""
- return OutputFile.from_string((TEMPLATE % {
+ result = (TEMPLATE % {
'description': description,
'url': url,
'license_description': license_description,
'source': source,
'contributors': contributors,
'funders': funders,
- }).encode('utf-8'))
+ }).encode('utf-8')
else:
- return OutputFile.from_string(unicode(result).encode('utf-8'))
+ result = unicode(result).encode('utf-8')
+ return OutputFile.from_string("\r\n".join(result.splitlines()))