-
Notifications
You must be signed in to change notification settings - Fork 13
rest2html
JensDiemer edited this page Apr 5, 2015
·
1 revision
The normal way to create html from a reStructuredText markup will produces a very bloated html code with many class
, id
, div
etc.
We add a clean reStructuredText html writer and add simple rest2html method to use it.
>>> from creole.rest2html.clean_writer import rest2html
>>> rest2html(u"A ReSt link to `PyLucid CMS <http://www.pylucid.org>`_ :)")
u'<p>A ReSt link to <a href="http://www.pylucid.org">PyLucid CMS</a> :)</p>\\n'
(Note: docutils must be installed to use rest2html)
There exist some separate unitests for it here: /creole/tests/test_rest2html.py
The main sourcecode could you find here: /creole/rest2html/clean_writer.py