From 1b3180e3abccb3199de8a7c4f911f6bdbfdec35c Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 5 Jan 2022 16:20:24 -0600 Subject: [PATCH] Fix indexing error cutting off last line of docstrings Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- nfdocs-parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nfdocs-parser.py b/nfdocs-parser.py index ad3cf8f..d8a31c8 100755 --- a/nfdocs-parser.py +++ b/nfdocs-parser.py @@ -66,7 +66,7 @@ with open(nextflow_path) as nextflow_file: # Check if we've reached the end of a docstring block if doc_end == i: # 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 docstrings = { @@ -77,7 +77,7 @@ with open(nextflow_path) as nextflow_file: # Parse out the docstrings and put them in the appropriate dictionary 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 = "" for i in pos: doc_yaml = doc_yaml + nextflow_lines[i].replace(DOC_STARTER, "")