Commit b79430c5 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix embed_position encoding bug.

parent 3aad1ec5
......@@ -47,7 +47,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if Options.embed_pos_in_docstring:
env.doc = EncodedString(u'File: %s (starting at line %s)' % Nodes.relative_position(self.pos))
if not self.doc is None:
env.doc = EncodedString(env.doc + u'\\n' + self.doc)
env.doc = EncodedString(env.doc + u'\n' + self.doc)
env.doc.encoding = self.doc.encoding
else:
env.doc = self.doc
......
......@@ -63,7 +63,7 @@ def embed_position(pos, docstring):
# reuse the string encoding of the original docstring
doc = EncodedString(pos_line)
else:
doc = EncodedString(pos_line + u'\\n' + docstring)
doc = EncodedString(pos_line + u'\n' + docstring)
doc.encoding = encoding
return doc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment