Fix embed_position encoding bug.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 14 Aug 2008 05:08:51 +0000 (22:08 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 14 Aug 2008 05:08:51 +0000 (22:08 -0700)
Cython/Compiler/ModuleNode.py
Cython/Compiler/Nodes.py

index 5e95423166cba1eb74579a387e186b87cf40fd25..60071619d522e9d77bf83c74e94e2d99a3abcf37 100644 (file)
@@ -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
index 5b11be25c53dfbdee0fe28c72ad5da419a33f117..2b299a234bc9f6b622146a8bdca986b0454813bb 100644 (file)
@@ -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