[Checkins] SVN: zope.app.renderer/trunk/ Fix reST rendering with docutils 0.5.
Dan Korostelev
nadako at gmail.com
Tue Jan 13 08:22:04 EST 2009
Log message for revision 94722:
Fix reST rendering with docutils 0.5.
Fix mailing list and pypi addresses.
Changed:
U zope.app.renderer/trunk/CHANGES.txt
U zope.app.renderer/trunk/setup.py
U zope.app.renderer/trunk/src/zope/app/renderer/rest.py
-=-
Modified: zope.app.renderer/trunk/CHANGES.txt
===================================================================
--- zope.app.renderer/trunk/CHANGES.txt 2009-01-13 12:38:23 UTC (rev 94721)
+++ zope.app.renderer/trunk/CHANGES.txt 2009-01-13 13:22:04 UTC (rev 94722)
@@ -2,6 +2,11 @@
CHANGES
=======
+3.4.1 (unreleased)
+------------------
+
+- Fix reST rendering with docutils 0.5.
+
3.4.0 (2007-10-27)
------------------
Modified: zope.app.renderer/trunk/setup.py
===================================================================
--- zope.app.renderer/trunk/setup.py 2009-01-13 12:38:23 UTC (rev 94721)
+++ zope.app.renderer/trunk/setup.py 2009-01-13 13:22:04 UTC (rev 94722)
@@ -22,9 +22,9 @@
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(name='zope.app.renderer',
- version = '3.5.0',
+ version = '3.4.1dev',
author='Zope Corporation and Contributors',
- author_email='zope3-dev at zope.org',
+ author_email='zope-dev at zope.org',
description='Text Renderer Framework',
long_description=(
read('README.txt')
@@ -42,7 +42,7 @@
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
- url='http://cheeseshop.python.org/pypi/zope.app.renderer',
+ url='http://pypi.python.org/pypi/zope.app.renderer',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir = {'': 'src'},
Modified: zope.app.renderer/trunk/src/zope/app/renderer/rest.py
===================================================================
--- zope.app.renderer/trunk/src/zope/app/renderer/rest.py 2009-01-13 12:38:23 UTC (rev 94721)
+++ zope.app.renderer/trunk/src/zope/app/renderer/rest.py 2009-01-13 13:22:04 UTC (rev 94722)
@@ -75,8 +75,8 @@
>>> renderer = ReStructuredTextToHTMLRenderer(source, TestRequest())
>>> print renderer.render().strip()
<p>This is source.</p>
- <div class="section">
- <h3><a id="header-3" name="header-3">Header 3</a></h3>
+ <div class="section" id="header-3">
+ <h3>Header 3</h3>
<p>This is more source.</p>
</div>
"""
@@ -107,11 +107,11 @@
... 'doctitle_xform': 0 }
>>> renderer = ReStructuredTextToHTMLRenderer(text, None)
>>> print renderer.render(overrides)
- <div class="section">
- <h2><a id="heading-1" name="heading-1">Heading 1</a></h2>
+ <div class="section" id="heading-1">
+ <h2>Heading 1</h2>
<p>hello world</p>
- <div class="section">
- <h3><a id="heading-2" name="heading-2">Heading 2</a></h3>
+ <div class="section" id="heading-2">
+ <h3>Heading 2</h3>
</div>
</div>
<BLANKLINE>
@@ -126,9 +126,9 @@
overrides.update(settings_overrides)
writer = Writer()
writer.translator_class = ZopeTranslator
- html = docutils.core.publish_string(
+ html = docutils.core.publish_parts(
self.context,
writer=writer,
settings_overrides=overrides,
- )
+ )['body']
return html
More information about the Checkins
mailing list