This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Example of a custom ReST directive in Python docutils''' | |
import docutils.core | |
from docutils.nodes import TextElement, Inline | |
from docutils.parsers.rst import Directive, directives | |
from docutils.writers.html4css1 import Writer, HTMLTranslator | |
class foo(Inline, TextElement): | |
'''This node class is a no-op -- just a fun way to define some parameters. | |
There are lots of base classes to choose from in `docutils.nodes`. |