summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorJonathan Waltman <jonathan.waltman@gmail.com>2013-02-19 04:20:13 -0600
committerJonathan Waltman <jonathan.waltman@gmail.com>2013-02-19 04:20:13 -0600
commit7c976f4ce3f079b1986205b8b6291cbdbcd35d93 (patch)
tree4d2ff3d329efb4c8977543392be12ce13c68e36b /sphinx
parentfcd1b550a567a5327a4a3c439fe41f09c6c024c3 (diff)
downloadsphinx-7c976f4ce3f079b1986205b8b6291cbdbcd35d93.tar.gz
[texinfo] Avoid creating some unnecessary garbage when assembling the final document.
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/writers/texinfo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py
index d47d9920..bbfe0576 100644
--- a/sphinx/writers/texinfo.py
+++ b/sphinx/writers/texinfo.py
@@ -180,7 +180,8 @@ class TexinfoTranslator(nodes.NodeVisitor):
r = self.referenced_ids.pop()
if r not in self.written_ids:
self.body.append('@anchor{%s}@w{%s}\n' % (r, ' ' * 30))
- self.fragment = ''.join(self.body).strip() + '\n'
+ self.ensure_eol()
+ self.fragment = ''.join(self.body)
self.elements['body'] = self.fragment
self.output = TEMPLATE % self.elements