reST requires a relatively large third party library therefore it will
not incorporated in web2py (i.e. they will not be distributed
together). You can use reST right now if you easy_install it.

try:
    from docutils import core
    from docutils.writers.html4css1 import Writer,HTMLTranslator
    def reSTify(string):
        class NoHeaderHTMLTranslator(HTMLTranslator):
            def __init__(self, document):
                HTMLTranslator.__init__(self,document)
                self.head_prefix = ['','','','','']
                self.body_prefix = []
                self.body_suffix = []
                self.stylesheet = []
        w = Writer()
        w.translator_class = NoHeaderHTMLTranslator
        return core.publish_string(string,writer=w)
    WIKI=lambda text: XML(reSTify(text))
except:
    from gluon.contrib.markdown import WIKI


On Jun 29, 2:34 pm, Tim Michelsen <[email protected]> wrote:
> >    {{=TAG[''](*[P(p) for p in body.split('\n')]) }}
>
> > or, if you want to allow HTML tags in texts
>
> >    {{=XML(body.replace('\n','<br>'),sanitize=True)}}
>
> > of you want to allow WIKI syntax
>
> What about rest from the wiki?
> When will this be added to the devel branch?
> Please do give this tip a more prominent place in the documentation...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to