circuitpython/docs/c2rst.py
Scott Shawcroft 46e7f8e4fb Documentation rework to unify the docs together rather than having them
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.
2016-10-18 17:42:47 -07:00

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)