Skip to content

Commit 3147993

Browse files
authored
Merge pull request #137 from curlup/patch-1
fix HumanName repr for names with single quotes
2 parents 0c78234 + caec4ab commit 3147993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nameparser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def __repr__(self):
153153
if self.unparsable:
154154
_string = "<%(class)s : [ Unparsable ] >" % {'class': self.__class__.__name__, }
155155
else:
156-
_string = "<%(class)s : [\n\ttitle: '%(title)s' \n\tfirst: '%(first)s' \n\tmiddle: '%(middle)s' \n\tlast: '%(last)s' \n\tsuffix: '%(suffix)s'\n\tnickname: '%(nickname)s'\n]>" % {
156+
_string = "<%(class)s : [\n\ttitle: %(title)r \n\tfirst: %(first)r \n\tmiddle: %(middle)r \n\tlast: %(last)r \n\tsuffix: %(suffix)r\n\tnickname: %(nickname)r\n]>" % {
157157
'class': self.__class__.__name__,
158158
'title': self.title or '',
159159
'first': self.first or '',

0 commit comments

Comments
 (0)