I have a need for the following functionality. I'm unaware if it exists and
unsure how to develop it.
Problem: I have a reSTructured Text string that I need to pass to docutils.
I would like the same string passed back to me as reStructuredText but in a
python list of sections.
This is section 1
this is section 2
I need a list of the sections like so :
[u'Heading 1\r\n==========\r\n\r\nThis is section 1\r\n\r\n', u'Heading
2\r\n==========\r\n\r\nthis is section 2\r\n\r\n']
I have a work around that uses regex, but it falls short and doesn't seem
splitter = re.compile('(.*\r\n[=\-`:~^_*+#].*\r\n)')
reSTlist = splitter.split( reST )
Could I please have some guidance?
Thanks in advance!
Russell J Ballestrini
Get latest updates about Open Source Projects, Conferences and News.