46e7f8e4fb
on a per port basis. Also enables generating docs from inline RST in C code. Simply omits all lines except those that start with //|. Indentation after "//| " will be preserved.
11 lines
256 B
Python
11 lines
256 B
Python
import sphinx.parsers
|
|
import docutils.parsers.rst as rst
|
|
|
|
class CStrip(sphinx.parsers.Parser):
|
|
def __init(self):
|
|
self.rst_parser = rst.Parser()
|
|
|
|
def parse(self, inputstring, document):
|
|
print(inputstring)
|
|
self.rst_parser(stripped, document)
|