File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2121# If extensions (or modules to document with autodoc) are in another directory,
2222# add these directories to sys.path here. If the directory is relative to the
2323# documentation root, use os.path.abspath to make it absolute, like shown here.
24+ sys .path .insert (0 , os .path .abspath ('docs' ))
2425sys .path .insert (0 , os .path .abspath ('.' ))
2526
2627master_doc = 'docs/index'
Original file line number Diff line number Diff line change 11import sphinx .parsers
2- import docutils .parsers .rst as rst
32
43class CStrip (sphinx .parsers .Parser ):
5- def __init (self ):
6- self .rst_parser = rst . Parser ()
4+ def __init__ (self ):
5+ self .rst_parser = sphinx . parsers . RSTParser ()
76
8- def parse (self , inputstring , document ):
9- print (inputstring )
10- self .rst_parser (stripped , document )
7+ def parse (self , inputstring , document ):
8+ # This setting is missing starting with Sphinx 1.7.1 so we set it ourself.
9+ document .settings .tab_width = 4
10+ stripped = []
11+ for line in inputstring .split ("\n " ):
12+ line = line .strip ()
13+ if line == "//|" :
14+ stripped .append ("" )
15+ elif line .startswith ("//| " ):
16+ stripped .append (line [len ("//| " ):])
17+ stripped = "\r \n " .join (stripped )
18+ self .rst_parser .parse (stripped , document )
You can’t perform that action at this time.
0 commit comments