from docutils.parsers.rst import Directive
from docutils import nodes
class license_and_copyright( nodes.General, nodes.Element ): pass
class LicenseAndCopyright( Directive ):
has_content = True
def run( self ):
self.assert_has_content()
result_node = license_and_copyright( rawsource = '\n'.join( self.content ) )
self.state.nested_parse( self.content, self.content_offset, result_node )
return [ result_node ]