[Zope] Re: [Docutils-develop] ReStructuredText now in Zope
Richard Jones
rjones@ekit-inc.com
Thu, 15 Aug 2002 21:13:17 +1000
On Thu, 15 Aug 2002 7:06 pm, Peter Funk wrote:
> To aid this I would find it very useful, if either the ZReST package or
> docutils could export a wrapper function implementing a very simple API
> similar to this found in Zope/StructuredText/StructuredText:
> def html_with_references(text, level=1, header=1)
> """
> Given a string 'text' containing structured text markup
> returns this 'text' rendered as HTML
> """
ReStructuredText takes some time to convert source text into HTML (sometimes
several seconds for longish documents). I'd advise going for a more
integrated approach that can compile the source text once.
If you're really keen to actually go with the html_with_references path -
borrow the code from the ZReST.render() method and you'll have your text to
HTML conversion.
Richard