Module reahl.mailutil.rst

Tools for handling ReStructured Text.

RestructuredText

class reahl.mailutil.rst.RestructuredText(rst_text)

A chunk of ReStructured Text.

Parameters:rst_text – A string containing the actual restructured text represented by this instance.
as_HTML_fragment(header_start=1, report_level=6, halt_level=4)

Returns this RestructuredText formatted as an HTML fragment.

Parameters:
  • header_start – The n of the top-level <hn> for top-level heading in this text.
  • report_level – Reports ReST error messages at or higher than this level.
  • halt_level – Error messages above this level result in exceptions.

New in version 4.0.