# -*- coding: utf-8 -*- from __future__ import unicode_literals from docutils import nodes from docutils.parsers.rst import directives, Directive """ HTML tags for reStructuredText ============================== Directives ---------- .. html:: (HTML code) Example ------- A search engine: .. html::
A contact form: .. html::



""" class RawHtml(Directive): required_arguments = 0 optional_arguments = 0 final_argument_whitespace = True has_content = True def run(self): html = ' '.join(self.content) node = nodes.raw('', html, format='html') return [node] def register(): directives.register_directive('html', RawHtml)