mirror of
https://github.com/MillironX/nfdocs-parser.git
synced 2024-11-24 17:59:54 +00:00
Fix indexing error cutting off last line of docstrings
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
parent
557a7e3ccd
commit
1b3180e3ab
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ with open(nextflow_path) as nextflow_file:
|
||||||
# Check if we've reached the end of a docstring block
|
# Check if we've reached the end of a docstring block
|
||||||
if doc_end == i:
|
if doc_end == i:
|
||||||
# Add this docstring position to the array
|
# Add this docstring position to the array
|
||||||
docstring_positions.append(range(doc_start, doc_end))
|
docstring_positions.append(range(doc_start, doc_end+1))
|
||||||
|
|
||||||
# Create dictionaries for each of the block types
|
# Create dictionaries for each of the block types
|
||||||
docstrings = {
|
docstrings = {
|
||||||
|
@ -77,7 +77,7 @@ with open(nextflow_path) as nextflow_file:
|
||||||
|
|
||||||
# Parse out the docstrings and put them in the appropriate dictionary
|
# Parse out the docstrings and put them in the appropriate dictionary
|
||||||
for pos in docstring_positions:
|
for pos in docstring_positions:
|
||||||
proc_name, proc_type = definition_type(nextflow_lines[pos[-1]+2])
|
proc_name, proc_type = definition_type(nextflow_lines[pos[-1]+1])
|
||||||
doc_yaml = ""
|
doc_yaml = ""
|
||||||
for i in pos:
|
for i in pos:
|
||||||
doc_yaml = doc_yaml + nextflow_lines[i].replace(DOC_STARTER, "")
|
doc_yaml = doc_yaml + nextflow_lines[i].replace(DOC_STARTER, "")
|
||||||
|
|
Loading…
Reference in a new issue