From b79430c5e9c90ed905ad1f589dc5c263a5fca38a Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 13 Aug 2008 22:08:51 -0700 Subject: [PATCH] Fix embed_position encoding bug. --- Cython/Compiler/ModuleNode.py | 2 +- Cython/Compiler/Nodes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 5e954231..60071619 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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 diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 5b11be25..2b299a23 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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 -- 2.26.2