Skip to content

Commit

Permalink
Improved STX renderer to handle unicode correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
strichter committed Sep 7, 2004
1 parent 08af9b1 commit 227de9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classmodule/browser.py
Expand Up @@ -375,7 +375,7 @@ def getDocString(self):
>>> view = getFunctionDetailsView()
>>> view.getDocString()
'<p>This is the foo function.</p>\n'
u'<p>This is the foo function.</p>\n'
"""
return renderText(self.context.getDocString() or '',
zapi.getParent(self.context).getPath())
Expand Down
12 changes: 6 additions & 6 deletions ifacemodule/browser.py
Expand Up @@ -311,8 +311,8 @@ def getAttributes(self):
>>> attrs = details.getAttributes()
>>> pprint(attrs)
[[('doc', '<p>This is bar.</p>\n'), ('name', 'bar')],
[('doc', '<p>This is foo.</p>\n'), ('name', 'foo')]]
[[('doc', u'<p>This is bar.</p>\n'), ('name', 'bar')],
[('doc', u'<p>This is foo.</p>\n'), ('name', 'foo')]]
"""
# The `Interface` and `Attribute` class have no security declarations,
# so that we are not able to access any API methods on proxied
Expand All @@ -339,10 +339,10 @@ def getMethods(self):
>>> methods = details.getMethods()
>>> pprint(methods)
[[('doc', '<p>This is blah.</p>\n'),
[[('doc', u'<p>This is blah.</p>\n'),
('name', 'blah'),
('signature', '()')],
[('doc', '<p>This is get.</p>\n'),
[('doc', u'<p>This is get.</p>\n'),
('name', 'get'),
('signature', '(key, default=None)')]]
"""
Expand Down Expand Up @@ -372,7 +372,7 @@ def getFields(self):
[('name', 'TextLine'),
('path', 'zope/schema/_bootstrapfields/TextLine')]),
('default', "u'Foo'"),
('description', '<p>Title</p>\n'),
('description', u'<p>Title</p>\n'),
('iface',
[('id', 'zope.schema.interfaces.ITextLine'),
('name', 'ITextLine')]),
Expand All @@ -382,7 +382,7 @@ def getFields(self):
[('name', 'Text'),
('path', 'zope/schema/_bootstrapfields/Text')]),
('default', "u'Foo.'"),
('description', '<p>Desc</p>\n'),
('description', u'<p>Desc</p>\n'),
('iface',
[('id', 'zope.schema.interfaces.IText'), ('name', 'IText')]),
('name', 'description'),
Expand Down

0 comments on commit 227de9d

Please sign in to comment.