fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'quiris/master'
[librarian.git]
/
librarian
/
text.py
diff --git
a/librarian/text.py
b/librarian/text.py
index
9a4fd7a
..
0f3c0bb
100644
(file)
--- a/
librarian/text.py
+++ b/
librarian/text.py
@@
-45,6
+45,8
@@
def transform(wldoc, flags=None, **options):
if flags:
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
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)
result = document.transform(style, **options)
@@
-82,7
+84,7
@@
def transform(wldoc, flags=None, **options):
source = ""
contributors = ""
funders = ""
source = ""
contributors = ""
funders = ""
- re
turn OutputFile.from_string(
(TEMPLATE % {
+ re
sult =
(TEMPLATE % {
'description': description,
'url': url,
'license_description': license_description,
'description': description,
'url': url,
'license_description': license_description,
@@
-90,7
+92,8
@@
def transform(wldoc, flags=None, **options):
'source': source,
'contributors': contributors,
'funders': funders,
'source': source,
'contributors': contributors,
'funders': funders,
- }).encode('utf-8')
)
+ }).encode('utf-8')
else:
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()) + "\r\n")