Commit 1b1859b9 authored by Rafael Monnerat's avatar Rafael Monnerat

Fix ReST transform

Add a local template due a bug into docutils, that is not able to
resolve relative url.
parent c7a4b1ef
...@@ -2,6 +2,7 @@ from Products.PortalTransforms.interfaces import ITransform ...@@ -2,6 +2,7 @@ from Products.PortalTransforms.interfaces import ITransform
from zope.interface import implements from zope.interface import implements
from reStructuredText import HTML from reStructuredText import HTML
import sys import sys
import os
class rest: class rest:
r"""Converts from reST to HTML. r"""Converts from reST to HTML.
...@@ -57,8 +58,10 @@ class rest: ...@@ -57,8 +58,10 @@ class rest:
output_encoding = kwargs.get('output_encoding', encoding) output_encoding = kwargs.get('output_encoding', encoding)
language = kwargs.get('language', 'en') language = kwargs.get('language', 'en')
warnings = kwargs.get('warnings', None) warnings = kwargs.get('warnings', None)
rest_template = os.path.join(os.path.dirname(__file__), 'rest.template')
settings = {'documentclass': '', settings = {'documentclass': '',
'traceback': 1, 'traceback': 1,
'template' : rest_template
} }
html = HTML(orig, html = HTML(orig,
report_level=2, report_level=2,
......
%(head_prefix)s
%(head)s
%(stylesheet)s
%(body_prefix)s
%(body_pre_docinfo)s
%(docinfo)s
%(body)s
%(body_suffix)s
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment