Skip to content

Commit

Permalink
update docs/extensions/fancy_include.py with git_cast_file2repos.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Müller committed Nov 16, 2017
1 parent 79027ac commit 1f6a60c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/extensions/fancy_include.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ def run(self):
with io.open(full_path, "r") as myfile:
text = myfile.read()

# add reference
name = op.basename(full_path)[:-3]
rst = [".. _example_{}:".format(name),
"",
]

# add docstring
source = text.split('"""')
doc = source[1].split("\n")
doc.insert(1, "~" * len(doc[0])) # make title heading

code = source[2].split("\n")

# documentation
rst = []
for line in doc:
rst.append(line)

Expand Down

0 comments on commit 1f6a60c

Please sign in to comment.