Skip to content

Commit

Permalink
vimdoctool: Omit functions without documentation from output
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Jul 30, 2014
1 parent e33f27d commit c0f6200
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vimdoctool.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,9 @@ def generate_documentation(directory, startlevel=1, vfs=None):
if parse_results['description']:
output.append("\n".join(parse_results['description']))
for function, comments in parse_results['functions']:
output.append("%s The `%s()` function" % ("#" * (startlevel + 1), function))
if any(line and not line.isspace() for line in comments):
output.append("%s The `%s()` function" % ("#" * (startlevel + 1), function))
output.append("\n".join(comments))
else:
output.append('<span style="color: #ccc;">(this function is currently undocumented)</span>')
return "\n\n".join(output)

def find_vim_scripts(vfs):
Expand Down

0 comments on commit c0f6200

Please sign in to comment.