mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
This avoid duplication and could conceivably let us test this stuff in code later on. Signed-off-by: Stephen Finucane <stephen@that.guru>
14 lines
281 B
Python
14 lines
281 B
Python
from docutils import nodes
|
|
from docutils.parsers.rst import Directive
|
|
|
|
|
|
class HelloWorld(Directive):
|
|
|
|
def run(self):
|
|
paragraph_node = nodes.paragraph(text='Hello World!')
|
|
return [paragraph_node]
|
|
|
|
|
|
def setup(app):
|
|
app.add_directive("helloworld", HelloWorld)
|