[Zope3-checkins] CVS: Zope3/src/zope/app/renderer - stx.py:1.3
Philipp von Weitershausen
philikon at philikon.de
Thu Feb 19 14:57:23 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/renderer
In directory cvs.zope.org:/tmp/cvs-serv4712
Modified Files:
stx.py
Log Message:
Enable structured text rendering (incl. unit tests) now that we have
zope.structuredtext.
=== Zope3/src/zope/app/renderer/stx.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/renderer/stx.py:1.2 Sun Aug 17 02:07:54 2003
+++ Zope3/src/zope/app/renderer/stx.py Thu Feb 19 14:56:52 2004
@@ -17,13 +17,12 @@
"""
import re
+from zope.structuredtext.document import Document
+from zope.structuredtext.html import HTML
from zope.interface import implements
from zope.publisher.browser import BrowserView
from zope.app.interfaces.renderer import IStructuredTextSource, IHTMLRenderer
-from StructuredText import HTML
-
-
class StructuredTextSource(unicode):
"""Represents Structured Text source code"""
implements(IStructuredTextSource)
@@ -43,7 +42,8 @@
def render(self, context):
"See zope.app.interfaces.renderer.IHTMLRenderer"
- html = HTML(str(self.context))
+ doc = Document()(str(self.context))
+ html = HTML()(doc)
# strip html & body added by some zope versions
html = re.sub(
More information about the Zope3-Checkins
mailing list